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

/* ============================================================
   CSS 变量 & 基础重置
   ============================================================ */
:root {
  --mint: #b4fde1;
  --sky: #add8e6;
  --ink: #172620;
  --ink-80: rgba(23,38,32,0.80);
  --ink-40: rgba(23,38,32,0.40);
  --ink-10: rgba(23,38,32,0.10);
  --white: #ffffff;
  --clay-radius: 24px;
  --clay-radius-sm: 16px;
  --clay-border: 3px solid var(--ink);
  --clay-shadow: 4px 4px 0px var(--ink);
  --clay-shadow-inset: inset -2px -2px 8px rgba(23,38,32,0.15);
  --clay-shadow-lg: 6px 6px 0px var(--ink), inset -2px -2px 10px rgba(23,38,32,0.12);
  --bottom-bar-h: 60px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 200ms cubic-bezier(0.34,1.56,0.64,1);
  --ease-std: 200ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body.clay-body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* scroll-margin for fixed bottom bar */
div[id] {
  scroll-margin-top: calc(var(--bottom-bar-h) + 16px);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, button { font-size: 16px; }

/* sr-only */
.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;
}

/* ============================================================
   全屏遮罩菜单
   ============================================================ */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
  padding: 40px 24px calc(var(--bottom-bar-h) + 24px);
}
.overlay-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--mint);
  color: var(--ink);
  border: var(--clay-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--clay-shadow);
  transition: transform var(--transition);
}
.overlay-close:hover { transform: scale(1.1) rotate(10deg); }

.overlay-brand {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  color: var(--mint);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.overlay-nav dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.overlay-nav dt.overlay-nav-title {
  color: var(--mint);
  opacity: 0.6;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.overlay-nav dt.overlay-nav-title span { display: inline-block; }
.overlay-nav dd a {
  display: block;
  background: var(--mint);
  color: var(--ink);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  padding: 12px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: var(--clay-shadow);
  min-width: 200px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--ease-std);
}
.overlay-nav dd a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 6px 8px 0px var(--ink);
}
.overlay-nav dd a:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0px var(--ink);
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding-bottom: 0;
  background: linear-gradient(135deg, var(--ink) 0%, #1f3b30 100%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to left, rgba(23,38,32,0.88) 40%, rgba(23,38,32,0.30) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 56px 32px 80px;
  text-align: right;
}

.hero-h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--mint);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--sky);
  line-height: 1.6;
  margin-bottom: 24px;
  opacity: 0.9;
}

/* ============================================================
   共用 Clay 组件
   ============================================================ */
.clay-btn {
  display: inline-block;
  background: var(--mint);
  color: var(--ink);
  border: var(--clay-border);
  border-radius: var(--clay-radius-sm);
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: var(--clay-shadow-lg);
  transition: transform var(--transition), box-shadow var(--ease-std);
  white-space: nowrap;
}
.clay-btn:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 8px 10px 0px var(--ink), inset -2px -2px 10px rgba(23,38,32,0.15);
}
.clay-btn:active {
  transform: translateY(2px);
  box-shadow: 2px 2px 0px var(--ink);
}

.clay-btn-sm {
  display: inline-block;
  background: var(--mint);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--clay-radius-sm);
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--clay-shadow);
  transition: transform var(--transition), box-shadow var(--ease-std);
}
.clay-btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 5px 6px 0px var(--ink);
}

.clay-btn-bar {
  background: var(--sky);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--clay-shadow);
  transition: transform var(--transition);
}
.clay-btn-bar:hover { transform: scale(1.07); }

.clay-card {
  background: var(--white);
  border: var(--clay-border);
  border-radius: 28px;
  box-shadow: var(--clay-shadow-lg);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--ease-std);
}
.clay-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 10px 0px var(--ink), inset -2px -2px 10px rgba(23,38,32,0.10);
}

.clay-input {
  background: #f0fff8;
  border: 3px solid var(--ink);
  border-radius: var(--clay-radius-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--ink);
  box-shadow: var(--clay-shadow-inset);
  outline: none;
  flex: 1;
  min-width: 0;
  transition: border-color var(--ease-std), box-shadow var(--ease-std);
}
.clay-input:focus {
  border-color: #0a9b60;
  box-shadow: inset -2px -2px 8px rgba(23,38,32,0.2), 0 0 0 3px rgba(180,253,225,0.5);
}

/* ============================================================
   主体 Main
   ============================================================ */
.clay-root {
  position: relative;
}

.clay-main {
  background: #eefaf4;
  min-height: 60vh;
  padding: 40px 0 calc(var(--bottom-bar-h) + 48px);
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 32px;
  align-items: start;
  position: relative;
}

.deco-figure {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  height: 0;
  pointer-events: none;
  overflow: visible;
}

.clay-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
}
.blob-1 {
  width: 220px;
  height: 220px;
  background: var(--mint);
  top: -60px;
  left: -60px;
  filter: blur(40px);
}
.blob-2 {
  width: 160px;
  height: 160px;
  background: var(--sky);
  top: -20px;
  right: 40px;
  filter: blur(30px);
}

.content-body {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

/* 正文内部样式 */
.content-body h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 16px;
  line-height: 1.3;
}
.content-body h2:first-child { margin-top: 0; }

.content-body h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 12px;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: #1a2e26;
  margin-bottom: 16px;
}

.content-body ul, .content-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.content-body li {
  list-style: disc;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 6px;
  color: #1a2e26;
}
.content-body ol li { list-style: decimal; }

.content-body a {
  color: #0a7a4e;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.content-body a:hover { color: var(--ink); }

.content-body strong { font-weight: 700; }
.content-body em { font-style: italic; }

.content-body div {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: var(--clay-shadow-lg);
  padding: 28px 28px 20px;
  margin-bottom: 32px;
  transition: transform var(--transition);
}
.content-body div:hover {
  transform: translateY(-3px);
}
.content-body div:last-child { margin-bottom: 0; }

/* h2 > span 标题装饰 */
.content-body h2 > span,
.content-body h3 > span {
  display: inline-block;
  position: relative;
}

/* ============================================================
   Aside 侧边栏
   ============================================================ */
.content-aside {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: calc(var(--bottom-bar-h) + 20px);
}

.aside-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.aside-title span { display: inline-block; }

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-link {
  display: block;
  background: linear-gradient(135deg, var(--mint) 0%, var(--sky) 100%);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--clay-radius-sm);
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--transition), box-shadow var(--ease-std);
}
.aside-link:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 5px 5px 0 var(--ink);
}
.aside-link:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

/* ============================================================
   Footer
   ============================================================ */
.clay-footer {
  background: var(--ink);
  color: var(--mint);
  padding-bottom: calc(var(--bottom-bar-h) + 24px);
}

.footer-top {
  border-bottom: 3px solid rgba(180,253,225,0.2);
  padding: 48px 32px 36px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo-link img, .footer-logo {
  height: 48px;
  width: auto;
}
.footer-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mint);
  letter-spacing: -0.02em;
}
.footer-tagline {
  font-size: 0.9rem;
  color: var(--sky);
  opacity: 0.8;
  line-height: 1.5;
  max-width: 400px;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-cols {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col-title span { display: inline-block; }

.footer-col nav dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col nav dt { /* sr-only already handled */ }
.footer-col nav dd a {
  font-size: 0.9rem;
  color: var(--sky);
  opacity: 0.85;
  transition: color var(--ease-std), opacity var(--ease-std);
  display: inline-block;
  padding: 4px 0;
  min-height: 40px;
  line-height: 2;
}
.footer-col nav dd a:hover {
  color: var(--mint);
  opacity: 1;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--sky);
  opacity: 0.7;
  line-height: 1.7;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-form-label {
  font-size: 0.85rem;
  color: var(--sky);
  opacity: 0.8;
}
.footer-form-row {
  display: flex;
  gap: 8px;
}

.footer-bottom {
  border-top: 3px solid rgba(180,253,225,0.15);
  padding: 24px 32px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--mint);
  opacity: 0.7;
  margin-bottom: 6px;
}
.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--sky);
  opacity: 0.55;
}

/* ============================================================
   底部固定导航条
   ============================================================ */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: var(--ink);
  border-top: 3px solid rgba(180,253,225,0.3);
  height: var(--bottom-bar-h);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.bottom-nav {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  gap: 8px;
}

.bottom-dl {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.bottom-dl-right {
  justify-content: flex-end;
}

.bottom-dl dt { display: none; }

.bottom-dl dd a {
  display: flex;
  align-items: center;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 10px 8px;
  min-height: 44px;
  white-space: nowrap;
  border-radius: 10px;
  transition: background var(--ease-std), color var(--ease-std);
  opacity: 0.8;
}
.bottom-dl dd a:hover {
  background: rgba(180,253,225,0.12);
  opacity: 1;
}

.bottom-brand {
  flex-shrink: 0;
}
.bottom-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mint);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  border: 3px solid rgba(23,38,32,0.6);
  border-radius: 16px;
  padding: 8px 14px;
  min-height: 44px;
  box-shadow: var(--clay-shadow);
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: transform var(--transition);
}
.bottom-brand-link:hover { transform: scale(1.06); }

/* ============================================================
   Stagger 动效 (Intersection Observer via app.js)
   ============================================================ */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease-out, transform 400ms cubic-bezier(0.34,1.56,0.64,1);
}
.stagger-item.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    grid-column: 1;
    grid-row: 3;
    position: static;
  }
  .deco-figure {
    display: none;
  }
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    padding: 28px 20px;
  }
  .footer-top {
    padding: 36px 20px 24px;
  }
}

@media (max-width: 600px) {
  .hero-content {
    padding: 40px 20px 72px;
    max-width: 100%;
  }
  .hero-h1 {
    font-size: 1.7rem;
  }
  .content-section {
    padding: 0 16px;
  }
  .clay-main {
    padding: 28px 0 calc(var(--bottom-bar-h) + 36px);
  }
  .bottom-dl dd a {
    font-size: 0.7rem;
    padding: 10px 5px;
  }
  .bottom-brand-link {
    font-size: 0.75rem;
    padding: 8px 10px;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-form-row {
    flex-direction: column;
  }
  .content-body div {
    padding: 20px 16px 16px;
    border-radius: 20px;
  }
  .clay-card {
    border-radius: 20px;
  }
  .aside-card {
    border-radius: 20px;
  }
  .footer-bottom {
    padding: 20px 16px;
  }
}

/* ============================================================
   prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .stagger-item {
    opacity: 1;
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
