/* =========================================================
   博业赛场 · 共享外壳样式 /assets/site.css
   暖沙画册底 + 深靛蓝框线 + 信号橙节点
   ========================================================= */

:root {
  --sand-50: #F6EEDF;
  --sand-100: #E9D7B8;
  --sand-300: #C8A97E;
  --indigo-950: #111733;
  --indigo-800: #1E2A55;
  --signal: #E86F2C;
  --field: #2E7D5B;
  --score-red: #C43D3D;
  --cyan: #18C7B8;
  --violet: #6B5BD2;

  --ink: var(--indigo-950);
  --ink-soft: rgba(17, 23, 51, .66);
  --line: rgba(200, 169, 126, .72);

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-mono: "Roboto Mono", "IBM Plex Mono", "DIN Alternate", "Noto Sans Mono", "Noto Sans SC", monospace;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --cut: 18px;
  --gap: clamp(16px, 2.4vw, 28px);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow-card: 6px 6px 0 rgba(17, 23, 51, .14);
}

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

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video, canvas { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--indigo-950);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(24, 199, 184, .5);
}

.site-footer :focus-visible,
.site-nav :focus-visible {
  outline-color: var(--cyan);
  box-shadow: 0 0 0 5px rgba(17, 23, 51, .6);
}

/* ---------- 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--sand-50);
  background-image:
    radial-gradient(1100px 560px at 88% -8%, rgba(200, 169, 126, .34), transparent 68%),
    radial-gradient(820px 460px at -6% 4%, rgba(233, 215, 184, .62), transparent 66%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4.6vw, 48px); }
h3 { font-size: clamp(24px, 3.2vw, 32px); }
h4 { font-size: clamp(20px, 2.2vw, 24px); }

p { text-wrap: pretty; }

strong, b { font-weight: 700; }

::selection {
  background: var(--signal);
  color: var(--indigo-950);
}

/* ---------- 无障碍工具 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 18px;
  background: var(--indigo-950);
  color: var(--sand-50);
  border: 1px solid var(--cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  transform: translateY(-160%);
  transition: transform .18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 页面画框 ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  border: 1px solid rgba(200, 169, 126, .48);
  pointer-events: none;
  z-index: 200;
}

html.nav-is-open,
html.nav-is-open body { overflow: hidden; }

/* =========================================================
   头部
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 238, 223, .94);
  border-bottom: 1px solid var(--sand-300);
  transition: box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(246, 238, 223, .99);
  box-shadow: 0 10px 24px -18px rgba(17, 23, 51, .55);
}

.header-bar {
  max-width: 1240px;
  margin-inline: auto;
  min-height: 76px;
  padding: 12px clamp(16px, 3.4vw, 40px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}

.brand {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-right: 20px;
  border-right: 1px solid var(--sand-300);
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--indigo-950);
  line-height: 1;
  white-space: nowrap;
}

.brand-mark::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  background: var(--signal);
  transform: translateY(-3px) rotate(45deg);
}

.brand-tagline {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.7vw, 26px);
}

.nav-item { flex: 0 0 auto; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--indigo-950);
  white-space: nowrap;
  transition: color .16s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .18s var(--ease);
}

.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  right: auto;
  width: 16px;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--sand-300);
  transform: translateY(-1px);
}

.nav-cta { display: none; }

/* 工具条 */
.header-utility { flex: 0 0 auto; }

.utility-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft);
}

.utility-item {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.utility-item::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--cyan);
  flex: 0 0 auto;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .03em;
  border: 1px solid var(--indigo-950);
  background: transparent;
  color: var(--indigo-950);
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.btn::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  transition: transform .16s var(--ease);
}

.btn:hover::after,
.btn:focus-visible::after { transform: translateX(3px); }

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--indigo-950);
}

.btn--signal:hover,
.btn--signal:focus-visible {
  background: var(--indigo-950);
  border-color: var(--indigo-950);
  color: var(--sand-50);
}

.btn--ghost {
  background: transparent;
  border-color: var(--sand-300);
  color: var(--indigo-950);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--indigo-950);
  background: var(--sand-100);
}

.btn--dark {
  background: var(--indigo-950);
  border-color: var(--indigo-950);
  color: var(--sand-50);
}

.btn--dark:hover,
.btn--dark:focus-visible {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--indigo-950);
}

.header-cta { flex: 0 0 auto; }

/* 汉堡 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--indigo-950);
  color: var(--indigo-950);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  line-height: 1;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .1s linear;
  z-index: 2;
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background-color: var(--indigo-950);
  background-image:
    linear-gradient(rgba(24, 199, 184, .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 199, 184, .065) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--sand-100);
  border-top: 2px solid var(--signal);
}

.footer-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.footer-upper {
  padding-block: clamp(38px, 5.6vw, 72px);
  border-bottom: 1px solid rgba(200, 169, 126, .22);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(228px, 1.15fr) minmax(0, 2fr) minmax(212px, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
}

.footer-mark {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.1;
  color: var(--sand-50);
}

.footer-mark::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  background: var(--signal);
  transform: translateY(-4px) rotate(45deg);
}

.footer-line {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(233, 215, 184, .78);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--sand-300);
}

.footer-links li + li { margin-top: 10px; }

.footer-link {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--sand-100);
  transition: color .16s var(--ease);
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .18s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible { color: var(--sand-50); }

.footer-link:hover::after,
.footer-link:focus-visible::after { transform: scaleX(1); }

.contact-list { display: grid; gap: 12px; }

.contact-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.9;
  color: var(--sand-300);
}

.contact-value {
  font-size: 14px;
  line-height: 1.7;
  color: var(--sand-50);
  word-break: break-word;
}

.footer-lower {
  padding-block: 22px 26px;
}

.footer-service {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(233, 215, 184, .66);
  max-width: 60ch;
}

.footer-legal-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(200, 169, 126, .18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(233, 215, 184, .72);
}

.footer-legal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-legal::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--field);
  display: inline-block;
}

.footer-copy { color: rgba(233, 215, 184, .72); }

/* =========================================================
   通用内容组件
   ========================================================= */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 44px);
}

.section { padding-block: clamp(44px, 7vw, 88px); }
.section--tight { padding-block: clamp(26px, 4vw, 52px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--field);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--signal);
  flex: 0 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink-soft);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "/";
  color: var(--sand-300);
}

.breadcrumb a { transition: color .16s var(--ease); }
.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--signal); }

.prose {
  max-width: 42em;
  font-size: 17px;
  line-height: 1.8;
  color: var(--indigo-950);
}

.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25em; list-style: disc; }
.prose a { border-bottom: 1px solid var(--signal); }

.grid {
  display: grid;
  gap: var(--gap);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  background: var(--sand-100);
  border: 1px solid var(--sand-300);
  padding: clamp(18px, 3vw, 32px);
}

.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.panel--dark {
  background: var(--indigo-950);
  border-color: var(--indigo-800);
  color: var(--sand-50);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--sand-300), rgba(200, 169, 126, 0));
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.6;
  color: var(--ink-soft);
}

.tag--green { color: var(--field); }
.tag--red { color: var(--score-red); }
.tag--cyan { color: #0F8E84; }
.tag--violet { color: var(--violet); }
.tag--sand { color: #8A6E42; }

/* 图片容器 */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(145deg, var(--indigo-800), var(--indigo-950));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.media > img,
.media > svg,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(168deg, rgba(232, 111, 44, .16), rgba(17, 23, 51, .32) 72%);
}

.media__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 9px 15px;
  background: rgba(17, 23, 51, .84);
  color: var(--sand-100);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  line-height: 1.5;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%);
}

.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

/* =========================================================
   平板
   ========================================================= */
@media (max-width: 1179px) {
  .header-utility { display: none; }
}

@media (max-width: 1079px) {
  .nav-index { display: none; }
}

@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-line { max-width: 46ch; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   移动端：边缘抽屉
   ========================================================= */
@media (max-width: 959px) {
  .header-bar {
    min-height: 64px;
    padding-block: 10px;
    gap: 12px;
  }

  .brand { border-right: 0; padding-right: 0; }
  .brand-tagline { display: none; }
  .brand-mark { font-size: 19px; }

  .header-cta { display: none; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 120;
    width: min(86vw, 360px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 88px 26px 34px;
    background-color: var(--indigo-950);
    background-image:
      linear-gradient(rgba(24, 199, 184, .075) 1px, transparent 1px),
      linear-gradient(90deg, rgba(24, 199, 184, .075) 1px, transparent 1px);
    background-size: 42px 42px;
    border-left: 1px solid rgba(200, 169, 126, .42);
    transform: translateX(102%);
    transition: transform .26s var(--ease);
    overflow-y: auto;
  }

  .site-nav[data-open] { transform: translateX(0); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item { border-bottom: 1px solid rgba(200, 169, 126, .22); }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 16px 2px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--sand-100);
  }

  .nav-link::after { display: none; }

  .nav-link:hover,
  .nav-link:focus-visible { color: var(--cyan); }

  .nav-link[aria-current="page"] { color: var(--signal); }

  .nav-index {
    display: inline-block;
    order: 2;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--sand-300);
    transform: none;
  }

  .nav-link[aria-current="page"] .nav-index { color: var(--signal); }

  .nav-cta {
    display: block;
    margin-top: 28px;
    padding: 14px 18px;
    background: var(--signal);
    color: var(--indigo-950);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
    text-align: center;
  }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .scroll-progress { height: 2px; }
}

@media (max-width: 599px) {
  body { font-size: 16px; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .footer-legal-row { font-size: 11.5px; }
  .contact-row { grid-template-columns: 42px minmax(0, 1fr); }
  .panel, .media { --cut: 12px; }
}

/* =========================================================
   减弱动效
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }

  .nav-link::after,
  .footer-link::after { transition: none !important; }

  .btn:hover::after,
  .btn:focus-visible::after { transform: none; }

  .site-nav { transition: none; }
}
