/* =========================================
   贝博空间 · Site CSS
   共享样式：Reset · 变量 · 排版 · 头部 · 页脚 · 通用组件
   ========================================= */

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a {
  color: var(--sky);
  text-decoration: none;
}

a:hover {
  color: var(--grass);
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--forest);
}

h1 {
  font-weight: 200;
  font-size: clamp(42px, 6vw, 68px);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

p {
  margin: 0 0 1em;
}

hr {
  border: none;
  border-top: 1px solid rgba(27, 94, 94, 0.15);
  margin: 32px 0;
}

pre {
  background: var(--forest);
  color: var(--mist);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.7;
}

blockquote {
  margin: 24px 0;
  padding: 8px 0 8px 24px;
  border-left: 3px solid var(--sky);
  color: var(--slate);
  font-style: italic;
}

/* ---------- 2. Variables ---------- */
:root {
  --grass: #1B5E5E;
  --sky: #2D8FC2;
  --gold: #C9A227;
  --earth: #A65D3A;
  --jewel: #7A2E3B;
  --cream: #F5F1E8;
  --ink: #1A2226;
  --slate: #3C4A4D;
  --forest: #0F3B3B;
  --mist: #E8F1F5;

  --font-display: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  --font-caption: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;

  --container-main: 1240px;
  --container-wide: 1360px;

  --radius: 14px;
  --radius-sm: 8px;

  --space-section: 96px;
}

/* ---------- 3. Focus & Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -120%;
  left: 16px;
  z-index: 999;
  padding: 10px 22px;
  background: var(--grass);
  color: var(--cream);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-caption);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- 4. Layout Containers ---------- */
.content-container {
  max-width: var(--container-main);
  margin: 0 auto;
  padding: 0 32px;
}

.split-screen {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: 560px;
  padding: 64px 0;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: relative;
  z-index: 200;
  background: var(--cream);
  border-bottom: 1px solid rgba(27, 94, 94, 0.1);
}

.masthead {
  max-width: var(--container-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 24px 32px 14px;
}

.masthead-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-caption);
  font-size: 12px;
  line-height: 1.5;
  color: var(--slate);
  letter-spacing: 0.04em;
}

.masthead-left {
  align-items: flex-start;
}

.masthead-right {
  align-items: flex-end;
}

.meta-caption {
  font-weight: 500;
  color: rgba(60, 74, 77, 0.8);
}

.meta-en {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(60, 74, 77, 0.6);
  padding-left: 0.3em;
}

.masthead-brand {
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s ease;
}

.masthead-brand:hover {
  opacity: 0.85;
}

.brand-cn {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 200;
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
}

.brand-en {
  display: block;
  margin-top: 2px;
  padding-left: 0.42em;
  font-family: var(--font-caption);
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--slate);
}

.nav-shell {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(245, 241, 232, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(27, 94, 94, 0.14);
  border-bottom: 1px solid rgba(27, 94, 94, 0.14);
}

.site-nav {
  max-width: var(--container-main);
  margin: 0 auto;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 42px);
  margin: 0;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 13px 2px;
  font-family: var(--font-caption);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--slate);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--grass);
  border-bottom-color: rgba(201, 162, 39, 0.55);
}

.nav-link[aria-current="page"] {
  color: var(--grass);
  font-weight: 600;
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-line + .nav-toggle-line {
  margin-top: 3px;
}

.nav-toggle-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--sky), var(--gold));
  border-radius: 0 2px 2px 0;
  z-index: 5;
}

/* ---------- 6. Responsive Header ---------- */
@media (max-width: 768px) {
  .masthead {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: 16px 16px 8px;
  }

  .masthead-meta {
    display: none;
  }

  .brand-cn {
    font-size: 28px;
    letter-spacing: 0.1em;
  }

  .brand-en {
    font-size: 9px;
    letter-spacing: 0.3em;
  }

  .nav-shell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 16px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(27, 94, 94, 0.28);
    border-radius: 999px;
    color: var(--grass);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .nav-toggle:hover {
    background: rgba(27, 94, 94, 0.06);
    border-color: var(--grass);
  }

  .nav-toggle.is-active {
    border-color: var(--grass);
  }

  .nav-toggle.is-active .nav-toggle-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-toggle.is-active .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active .nav-toggle-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: none;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    background: rgba(245, 241, 232, 0.98);
    border-bottom: 1px solid rgba(27, 94, 94, 0.12);
    box-shadow: 0 20px 40px rgba(15, 59, 59, 0.14);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 20px;
  }

  .site-nav .nav-link {
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(27, 94, 94, 0.08);
  }

  .site-nav .nav-link[aria-current="page"] {
    border-bottom-color: transparent;
    padding-left: 12px;
    background: rgba(27, 94, 94, 0.06);
    border-radius: var(--radius-sm);
  }

  .scroll-progress {
    bottom: 0;
  }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  background: var(--forest);
  color: rgba(245, 241, 232, 0.82);
  margin-top: var(--space-section);
}

.footer-main {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 72px 32px 40px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.4fr;
  gap: 56px;
}

.footer-brand,
.footer-nav,
.footer-contact {
  min-width: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream);
  line-height: 1.3;
}

.footer-brand-en {
  font-family: var(--font-caption);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(232, 241, 245, 0.5);
  margin-top: 2px;
}

.footer-slogan {
  margin-top: 16px;
  font-family: var(--font-caption);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer-statement {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(232, 241, 245, 0.65);
  max-width: 42ch;
}

.footer-heading {
  margin-bottom: 20px;
  font-family: var(--font-caption);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-list a,
.footer-legal a {
  display: inline-block;
  font-family: var(--font-caption);
  font-size: 14px;
  color: rgba(232, 241, 245, 0.75);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-list a:hover,
.footer-legal a:hover {
  color: var(--gold);
  transform: translateX(3px);
}

.footer-address {
  display: grid;
  gap: 6px;
  font-family: var(--font-caption);
  font-size: 14px;
  line-height: 1.7;
  color: rgba(232, 241, 245, 0.75);
}

.footer-note {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(201, 162, 39, 0.5);
  font-size: 12px;
  color: rgba(232, 241, 245, 0.5);
  line-height: 1.6;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(232, 241, 245, 0.12);
}

.footer-bottom-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-caption);
  font-size: 12px;
  color: rgba(232, 241, 245, 0.5);
}

.copyright {
  letter-spacing: 0.04em;
}

.footer-tagline {
  letter-spacing: 0.08em;
}

@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 24px 32px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    padding: 16px 24px;
  }
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-caption);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--grass);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--forest);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 94, 94, 0.22);
}

.btn-ghost {
  color: var(--grass);
  border-color: rgba(27, 94, 94, 0.5);
}

.btn-ghost:hover {
  background: rgba(27, 94, 94, 0.08);
  color: var(--forest);
  border-color: var(--forest);
}

/* ---------- 9. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-caption);
  font-size: 13px;
  color: var(--slate);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(60, 74, 77, 0.35);
}

.breadcrumb a {
  color: var(--sky);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--grass);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--slate);
  text-decoration: none;
}

/* ---------- 10. Grid ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

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

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .split-screen {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 0;
  }

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

@media (max-width: 620px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 11. Card & Glass ---------- */
.card {
  background: var(--cream);
  border: 1px solid rgba(27, 94, 94, 0.1);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 59, 59, 0.1);
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(27, 94, 94, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(15, 59, 59, 0.08);
  padding: 24px;
}

/* ---------- 12. Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(45, 143, 194, 0.1);
  color: var(--sky);
  font-family: var(--font-caption);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  white-space: nowrap;
}

.tag--gold {
  background: rgba(201, 162, 39, 0.12);
  color: #8F7216;
}

.tag--earth {
  background: rgba(166, 93, 58, 0.12);
  color: var(--earth);
}

.tag--jewel {
  background: rgba(122, 46, 59, 0.1);
  color: var(--jewel);
}

/* ---------- 13. Section Heading ---------- */
.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 32px;
}

.section-index {
  font-family: var(--font-caption);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--forest);
  max-width: 24ch;
}

.section-desc {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--slate);
  max-width: 56ch;
}

/* ---------- 14. Time Meta ---------- */
.time-meta {
  font-family: var(--font-caption);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
  white-space: nowrap;
}

/* ---------- 15. Image Placeholder ---------- */
.image-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--mist) 0%, var(--cream) 100%);
  border: 1px solid rgba(27, 94, 94, 0.08);
  aspect-ratio: 4 / 3;
  color: rgba(60, 74, 77, 0.4);
  font-family: var(--font-caption);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.image-placeholder::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 16px 12px;
  background: linear-gradient(to top, rgba(15, 59, 59, 0.6), transparent);
  color: rgba(245, 241, 232, 0.92);
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-placeholder:hover::after,
.image-placeholder:focus-within::after {
  opacity: 1;
}

.image-placeholder--wide {
  aspect-ratio: 16 / 9;
}

.image-placeholder--tall {
  aspect-ratio: 3 / 4;
}

.image-placeholder--square {
  aspect-ratio: 1 / 1;
}

/* ---------- 16. Responsive Common ---------- */
@media (max-width: 768px) {
  .content-container {
    padding: 0 20px;
  }
}

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

  .card:hover,
  .btn:hover {
    transform: none;
  }

  .nav-toggle-line {
    transition: none;
  }
}
