﻿:root {
  --header-height: 72px;
  --header-bg: rgba(255, 252, 247, 0.72);
  --header-bg-solid: rgba(255, 252, 247, 0.94);
  --text: #332f2a;
  --muted: #6b6258;
  --line: rgba(76, 67, 58, 0.16);
  --shadow: 0 12px 40px rgba(40, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  color: var(--text);
  background: #fffaf3;
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--text);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--header-bg-solid);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  line-height: 1;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 15px;
  color: var(--muted);
}

.primary-nav a {
  position: relative;
  padding: 8px 0;
  line-height: 1.2;
  transition: color 160ms ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.is-active {
  color: var(--text);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.page-section + .page-section::before,
.footer-section::before {
  content: "";
  display: block;
  height: 12px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 252, 244, 0.92),
      rgba(232, 238, 218, 0.72),
      rgba(255, 252, 244, 0.92)
    );
}

.section-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.editable-copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.editable-copy.is-hidden {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 860px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    min-height: var(--header-height);
    padding: 10px 16px;
  }

  .brand {
    font-size: 16px;
  }

  .nav-toggle {
    display: grid;
    gap: 5px;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .site-header.is-open .primary-nav {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .primary-nav a {
    padding: 12px 10px;
    border-radius: 6px;
  }

  .primary-nav a:hover,
  .primary-nav a:focus-visible,
  .primary-nav a.is-active {
    background: rgba(91, 80, 66, 0.08);
  }

  .primary-nav a::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


