@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #1a2e2a;
  color: #d4c4a8;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== CSS 变量 ===== */
:root {
  --mint: #5cc6b0;
  --sand: #d4c4a8;
  --dark: #172623;
  --dark2: #1a2e2a;
  --dark3: #243b36;
  --accent: #c67b5c;
  --accent2: #8ba060;
  --text: #d4c4a8;
  --text-dim: #9aab9e;
  --border: rgba(92, 198, 176, 0.25);
  --radius: 10px;
  --scroll-pad: 80px;
}

/* ===== 滚动偏移（吸顶导航补偿） ===== */
div[id] {
  scroll-margin-top: var(--scroll-pad);
}

/* ===== 站点包裹 ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== 页头 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #172623;
  border-bottom: 1px solid var(--border);
}

.header-brand {
  background: linear-gradient(135deg, #172623 60%, #1f3530 100%);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 40px;
  width: auto;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mint);
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ===== 导航：header > nav > p > a ===== */
.site-nav {
  background: var(--dark);
  padding: 0 1.5rem;
}

.nav-links {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: stretch;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--sand);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--mint);
  border-bottom-color: var(--mint);
  outline: none;
}

/* ===== Hero 区块 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, #172623 0%, #1f3a33 45%, #243b36 100%);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-article {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6rem 2rem 4rem;
}

/* 斜切色带装饰 */
.hero-slash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-slash::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: -5%;
  width: 55%;
  height: 70%;
  background: linear-gradient(135deg, rgba(92,198,176,0.08) 0%, rgba(92,198,176,0.03) 100%);
  clip-path: polygon(0 30%, 100% 0%, 100% 100%, 0% 100%);
}

.hero-slash::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(225deg, rgba(198,123,92,0.12) 0%, transparent 70%);
  clip-path: polygon(20% 0%, 100% 0%, 100% 100%, 0% 60%);
}

/* 纹理叠加 */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: right;
  max-width: 600px;
}

.hero-h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--mint);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--sand);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  background: var(--mint);
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  min-height: 44px;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}

.hero-cta:hover {
  background: #4db8a2;
  transform: translateY(-2px);
}

/* ===== 内容布局 main > div.wrap > ... ===== */
.wrap {
  /* wrap 包含 hero + content-layout */
}

.content-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ===== aside 在内容左侧 ===== */
.site-aside {
  position: sticky;
  top: calc(var(--scroll-pad) + 16px);
}

.aside-inner {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.aside-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 0.5rem;
}

.aside-inner hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.75rem 0;
}

.aside-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.aside-nav li a {
  display: block;
  padding: 0.5rem 0.625rem;
  color: var(--sand);
  text-decoration: none;
  font-size: 0.85rem;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.aside-nav li a:hover {
  background: rgba(92,198,176,0.12);
  color: var(--mint);
}

.aside-tip {
  background: rgba(198,123,92,0.1);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem;
}

.aside-tip strong {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.aside-tip p {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== 主内容区 ===== */
.main-content {
  min-width: 0;
}

.page-content-section {
  /* section 直接子元素 */
}

.page-content-article {
  /* article 直接子元素 */
}

/* ===== 正文内容样式 ===== */
.page-content-article h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--mint);
  letter-spacing: -0.03em;
  margin-top: 3rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.page-content-article h2:first-child {
  margin-top: 0;
}

.page-content-article h2 + hr {
  border: none;
  border-top: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.page-content-article h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sand);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.page-content-article h3 + hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.page-content-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.page-content-article a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.page-content-article a:hover {
  opacity: 0.8;
}

.page-content-article ul,
.page-content-article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.page-content-article li {
  line-height: 1.7;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.page-content-article strong {
  color: var(--sand);
  font-weight: 700;
}

.page-content-article em {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.page-content-article section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.page-content-article section:last-child {
  border-bottom: none;
}

.page-content-article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* 卡片样式（正文内可能含） */
.page-content-article .card,
.page-content-article [class*="card"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--dark3);
  margin-bottom: 1rem;
}

/* ===== 页脚：footer 极简 p + small ===== */
.site-footer {
  background: var(--dark);
  border-top: 1px solid var(--border);
  padding: 0;
}

.footer-cta {
  background: linear-gradient(135deg, #1f3a33 0%, var(--dark3) 100%);
  padding: 3rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.footer-cta-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sand);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2.5rem;
  background: var(--mint);
  color: var(--dark);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  min-height: 44px;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}

.footer-cta-btn:hover {
  background: #4db8a2;
  transform: translateY(-2px);
}

.footer-copy {
  text-align: center;
  padding: 1.25rem 1.5rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}

.site-footer small {
  display: block;
  text-align: center;
  padding: 0 1.5rem 1.5rem;
  font-size: 0.78rem;
  color: #6a8077;
  line-height: 1.6;
}

/* ===== 动效：Stagger List ===== */
@media (prefers-reduced-motion: no-preference) {
  .aside-nav li {
    opacity: 0;
    transform: translateX(-12px);
    animation: slideInLeft 0.4s ease-out forwards;
  }

  .aside-nav li:nth-child(1) { animation-delay: 0.05s; }
  .aside-nav li:nth-child(2) { animation-delay: 0.1s; }
  .aside-nav li:nth-child(3) { animation-delay: 0.15s; }
  .aside-nav li:nth-child(4) { animation-delay: 0.2s; }
  .aside-nav li:nth-child(5) { animation-delay: 0.25s; }
  .aside-nav li:nth-child(6) { animation-delay: 0.3s; }
  .aside-nav li:nth-child(7) { animation-delay: 0.35s; }

  @keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
  }

  .hero-content {
    animation: fadeUp 0.7s ease-out both;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .page-content-article div {
    opacity: 0;
    animation: sectionReveal 0.5s ease-out forwards;
  }

  .page-content-article div:nth-child(1) { animation-delay: 0.1s; }
  .page-content-article div:nth-child(2) { animation-delay: 0.15s; }
  .page-content-article div:nth-child(3) { animation-delay: 0.2s; }
  .page-content-article div:nth-child(4) { animation-delay: 0.25s; }
  .page-content-article div:nth-child(5) { animation-delay: 0.3s; }
  .page-content-article div:nth-child(6) { animation-delay: 0.35s; }
  .page-content-article div:nth-child(7) { animation-delay: 0.4s; }

  @keyframes sectionReveal {
    to { opacity: 1; }
  }

  /* Hover Micro-interaction */
  .nav-links a {
    transition: color 0.2s ease-out, border-color 0.2s ease-out, background 0.2s ease-out;
  }

  .hero-cta,
  .footer-cta-btn {
    transition: background 0.2s ease-out, transform 0.18s ease-out;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-aside {
    position: static;
    order: -1;
  }

  .aside-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .aside-nav li a {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
  }
}

@media (max-width: 600px) {
  :root {
    --scroll-pad: 110px;
  }

  .header-brand {
    padding: 0.625rem 1rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0.375rem;
  }

  .brand-tagline {
    font-size: 0.7rem;
  }

  .site-nav {
    padding: 0 0.75rem;
  }

  .nav-links {
    gap: 0;
  }

  .nav-links a {
    font-size: 0.78rem;
    padding: 0.625rem 0.625rem;
    min-height: 44px;
  }

  .hero-article {
    padding: 5rem 1.25rem 3rem;
    justify-content: center;
  }

  .hero-content {
    text-align: center;
    max-width: 100%;
  }

  .content-layout {
    padding: 2rem 1rem;
  }

  .footer-cta {
    padding: 2rem 1rem;
  }

  .footer-cta-text {
    font-size: 1rem;
  }
}

@media (max-width: 375px) {
  .hero-h1 {
    font-size: 2rem;
  }

  .nav-links a {
    font-size: 0.72rem;
    padding: 0.5rem;
  }
}

/* ===== 焦点可见性 ===== */
:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

/* ===== 图片 ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 选中色 ===== */
::selection {
  background: rgba(92,198,176,0.3);
  color: var(--sand);
}
