/* ==========================================================================
   万博max · 共享 Site Kit
   reset / tokens / typography / header / footer / shared components
   保存路径：/assets/site.css
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
[id] { scroll-margin-top: 96px; }

/* ---------- tokens ---------- */
:root {
  --ink: #0B1A2A;
  --ink-deep: #08131f;
  --slate: #1F2933;
  --amber: #E0A458;
  --celadon: #6FA287;
  --violet: #8B5CF6;
  --cream: #F5F1E8;
  --clay: #C97B5A;
  --moss: #4A5D4E;
  --stone: #6B7280;
  --gold-soft: #F2D398;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4.5vw, 3.25rem);
  --radius: 16px;
  --radius-sm: 8px;

  --edge: rgba(245, 241, 232, .10);
  --edge-strong: rgba(245, 241, 232, .22);
  --text: rgba(245, 241, 232, .78);
  --text-dim: rgba(245, 241, 232, .54);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--cream);
  background-color: var(--ink);
  background-image:
    radial-gradient(110% 80% at 88% -12%, rgba(139, 92, 246, .16), transparent 55%),
    radial-gradient(70% 60% at -5% 12%, rgba(111, 162, 135, .11), transparent 60%),
    radial-gradient(90% 70% at 50% 112%, rgba(224, 164, 88, .09), transparent 62%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.24;
  color: var(--cream);
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 5.2vw, 3.35rem); line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
h4 { font-size: 1.02rem; letter-spacing: 0; }
p { text-wrap: pretty; }
strong { color: var(--cream); font-weight: 700; }

::selection { background: var(--amber); color: #1b1206; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- layout ---------- */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--wrap));
  margin-inline: auto;
}
.main { display: block; }

.section { padding-block: clamp(2.6rem, 7vw, 5.5rem); }
.section--quiet { background: linear-gradient(180deg, rgba(74, 93, 78, .20), rgba(74, 93, 78, 0) 78%); }
.section--edge { border-top: 1px solid var(--edge); }

.section-head { display: grid; gap: .65rem; max-width: 66ch; margin-bottom: clamp(1.4rem, 3vw, 2.3rem); }
.section-title { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.35rem); line-height: 1.24; letter-spacing: -.01em; }
.section-lead { color: var(--text); font-size: 1.06rem; max-width: 62ch; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), var(--violet));
}

.mono { font-family: var(--font-mono); font-size: .88em; letter-spacing: .02em; }
.rule { height: 1px; border: 0; background: var(--edge); margin: 0; }
.stack > * + * { margin-top: 1rem; }

/* ---------- grid ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }

/* ---------- card ---------- */
.card {
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.65rem);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(31, 41, 51, .92), rgba(13, 28, 42, .92));
  transition: transform .26s var(--ease), border-color .26s var(--ease), box-shadow .26s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 164, 88, .45);
  box-shadow: 0 26px 42px -30px rgba(0, 0, 0, .95);
}
.card__kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--celadon);
}
.card__title { margin-top: .5rem; font-family: var(--font-serif); font-weight: 700; font-size: 1.18rem; line-height: 1.4; color: var(--cream); }
.card__body { margin-top: .55rem; font-size: .98rem; color: var(--text); }

/* ---------- media frame ---------- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 12% 8%, rgba(139, 92, 246, .28), transparent 56%),
    radial-gradient(90% 80% at 88% 100%, rgba(111, 162, 135, .22), transparent 60%),
    linear-gradient(160deg, #16273a, #0d1c2c 62%, #101f2f);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(245, 241, 232, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 241, 232, .06) 1px, transparent 1px);
  background-size: 44px 44px;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .45;
  background-image: radial-gradient(rgba(245, 241, 232, .10) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}
.media > img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: .7rem 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--gold-soft);
  background: linear-gradient(180deg, transparent, rgba(11, 26, 42, .88));
}

/* ---------- buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease), box-shadow .26s var(--ease);
}
.btn--amber {
  background: var(--amber);
  color: #1b1206;
  box-shadow: 0 12px 26px -14px rgba(224, 164, 88, .9);
}
.btn--amber:hover { transform: translateY(-2px); background: var(--gold-soft); }
.btn--ghost { border-color: var(--edge-strong); color: var(--cream); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--celadon); color: var(--celadon); }
.btn--violet { background: linear-gradient(120deg, var(--violet), #5b34c9); color: #fff; }
.btn--violet:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -18px rgba(139, 92, 246, .95); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--text);
}
.tag--clay { border-color: rgba(201, 123, 90, .5); color: var(--clay); }
.tag--celadon { border-color: rgba(111, 162, 135, .5); color: var(--celadon); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  padding-block: 1.15rem .2rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--text-dim);
}
.crumbs li { display: flex; align-items: center; gap: .45rem; }
.crumbs li + li::before { content: "/"; color: rgba(245, 241, 232, .28); }
.crumbs a { color: var(--text-dim); transition: color .2s var(--ease); }
.crumbs a:hover { color: var(--amber); }
.crumbs [aria-current="page"] { color: var(--gold-soft); }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  left: var(--gutter);
  top: -140px;
  z-index: 999;
  padding: .7rem 1.1rem;
  border-radius: 0 0 10px 10px;
  background: var(--amber);
  color: #1b1206;
  font-size: .92rem;
  font-weight: 700;
  transition: top .22s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  counter-reset: cmd-nav;
  background: linear-gradient(180deg, rgba(11, 26, 42, .97), rgba(11, 26, 42, .88));
  border-bottom: 1px solid var(--edge);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2.4vw, 2rem);
  min-height: 74px;
  padding-block: .55rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  flex: none;
  padding: .25rem .15rem;
  border-radius: 12px;
}
.brand-mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 28% 22%, rgba(139, 92, 246, .85), transparent 62%),
    linear-gradient(150deg, var(--amber), #b9752f 58%, var(--moss));
  box-shadow: inset 0 0 0 1px rgba(245, 241, 232, .24), 0 10px 22px -14px rgba(224, 164, 88, .9);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 26, 42, .5);
}
.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: inset 0 0 0 1px rgba(245, 241, 232, .32), 0 16px 26px -14px rgba(224, 164, 88, 1);
}

.brand-text { display: grid; gap: .08rem; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.14rem;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--cream);
}
.brand-suffix {
  margin-left: .12em;
  font-family: var(--font-mono);
  font-size: .74em;
  letter-spacing: 0;
  color: var(--amber);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  color: var(--text-dim);
  white-space: nowrap;
}

.cmd-nav { margin-inline-start: auto; }
.cmd-list { display: flex; align-items: center; gap: .12rem; }
.cmd-list li { counter-increment: cmd-nav; }
.cmd-list a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .42rem;
  padding: .5rem .72rem .62rem;
  border-radius: 8px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.cmd-list a::before {
  content: "0" counter(cmd-nav);
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: rgba(245, 241, 232, .32);
  transition: color .2s var(--ease);
}
.cmd-list a::after {
  content: "";
  position: absolute;
  left: .72rem;
  right: .72rem;
  bottom: .34rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--violet));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease);
}
.cmd-list a:hover { color: var(--cream); background: rgba(245, 241, 232, .06); }
.cmd-list a:hover::before { color: var(--celadon); }
.cmd-list a:hover::after,
.cmd-list a:focus-visible::after { transform: scaleX(1); }
.cmd-list a[aria-current="page"] { color: var(--amber); background: rgba(224, 164, 88, .09); }
.cmd-list a[aria-current="page"]::before { color: var(--amber); }
.cmd-list a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .55rem;
  margin-inline-start: auto;
  padding: .55rem .8rem;
  border: 1px solid var(--edge-strong);
  border-radius: 10px;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--celadon); background: rgba(111, 162, 135, .10); }
.nav-toggle-text { line-height: 1; }
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .26s var(--ease);
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.header-progress { height: 2px; background: rgba(245, 241, 232, .07); overflow: hidden; }
.header-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--celadon), var(--amber) 58%, var(--violet));
  transition: transform .12s linear;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(3.5rem, 9vw, 7rem);
  padding-block: clamp(2.6rem, 6vw, 4.4rem) 1.5rem;
  color: var(--text);
  border-top: 1px solid var(--edge);
  background:
    radial-gradient(70% 130% at 8% 0%, rgba(74, 93, 78, .55), transparent 62%),
    linear-gradient(180deg, #0c1a29, var(--ink-deep));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(150px, 1fr) minmax(230px, 1.25fr);
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: start;
}

.footer-brand { display: grid; gap: 1rem; justify-items: start; }
.footer-brand .brand { padding: 0; }
.footer-note { max-width: 40ch; font-size: .96rem; color: var(--text-dim); }

.footer-col { display: grid; gap: .9rem; align-content: start; }
.footer-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--celadon);
}
.footer-title::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

.footer-list { display: grid; gap: .5rem; font-size: .95rem; }
.footer-list a {
  display: inline-block;
  padding-bottom: 1px;
  color: var(--text);
  background-image: linear-gradient(90deg, var(--amber), var(--amber));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: color .2s var(--ease), background-size .28s var(--ease);
}
.footer-list a:hover { color: var(--amber); background-size: 100% 1px; }

.footer-contact { display: grid; gap: .7rem; font-size: .95rem; }
.footer-contact li { display: grid; gap: .12rem; }
.contact-key {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}
.contact-val { color: var(--text); }

.copy-mail {
  justify-self: start;
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--gold-soft);
  border-bottom: 1px dashed rgba(242, 211, 152, .5);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.copy-mail:hover { color: var(--amber); border-color: var(--amber); }
.copy-mail[data-state="copied"] { color: var(--celadon); border-color: var(--celadon); }
.copy-mail[data-state="failed"] { color: var(--clay); border-color: var(--clay); }

.footer-meta { font-size: .82rem; color: var(--stone); }

.footer-list--inline { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.footer-list--inline li + li { position: relative; padding-left: 1rem; }
.footer-list--inline li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--stone);
  transform: translateY(-50%);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.2rem;
  border-top: 1px dashed var(--edge);
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .02em;
  color: var(--stone);
}
.footer-base-note { color: var(--stone); }

/* ---------- responsive: header ---------- */
@media (max-width: 1080px) {
  .cmd-list { gap: 0; }
  .cmd-list a { padding-inline: .55rem; font-size: .88rem; }
  .cmd-list a::before { display: none; }
  .cmd-list a::after { left: .55rem; right: .55rem; }
}

@media (max-width: 880px) {
  .header-inner { min-height: 64px; }
  .brand-tag { display: none; }
  .nav-toggle { display: inline-flex; }

  .cmd-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-inline-start: 0;
    max-height: 0;
    visibility: hidden;
    overflow: hidden;
    background: linear-gradient(180deg, #13212f, var(--ink) 78%);
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 30px 46px -30px rgba(0, 0, 0, .95);
    transition: max-height .38s var(--ease), visibility .38s var(--ease);
  }
  .site-header[data-open] .cmd-nav {
    max-height: 78vh;
    overflow-y: auto;
    visibility: visible;
  }
  .cmd-list {
    flex-direction: column;
    align-items: stretch;
    padding: .35rem var(--gutter) 1.1rem;
  }
  .cmd-list a {
    justify-content: flex-start;
    padding: .95rem .3rem 1rem;
    border-bottom: 1px dashed var(--edge);
    border-radius: 0;
    font-size: 1rem;
  }
  .cmd-list li:last-child a { border-bottom: 0; }
  .cmd-list a::before { display: inline; }
  .cmd-list a::after { left: .3rem; right: auto; width: 28px; bottom: .52rem; }
}

/* ---------- responsive: footer ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
