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

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

:root {
  --mint: #b4fde1;
  --fog: #add8e6;
  --ink: #172620;
  --mint-dark: #7bedc2;
  --fog-dark: #7ab8cc;
  --ink-light: #2d4a3e;
  --white: #ffffff;
  --off-white: #f4fdf9;
  --card-bg: #e8fdf4;
  --shadow-outer: 4px 4px 12px rgba(23,38,32,0.18), 8px 8px 24px rgba(23,38,32,0.10);
  --shadow-inner: inset -2px -2px 8px rgba(255,255,255,0.7), inset 2px 2px 6px rgba(23,38,32,0.08);
  --shadow-btn: 3px 3px 0px rgba(23,38,32,0.3), 6px 6px 16px rgba(23,38,32,0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --border-w: 3px;
  --sidebar-w: 260px;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --font-ui: 'Raleway', system-ui, sans-serif;
  --transition: 200ms ease-out;
}

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

body.body-root {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(135deg, #e4fcf0 0%, #d6eef8 50%, #eaf8f0 100%);
  min-height: 100vh;
  line-height: 1.7;
}

/* ===== Clay卡片基础 ===== */
.clay-card {
  background: linear-gradient(145deg, var(--mint) 0%, var(--fog) 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-outer), var(--shadow-inner);
  position: relative;
  overflow: hidden;
}

.clay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint) 0%, #8ef5ce 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
  padding: 14px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
  min-height: 48px;
  line-height: 1.3;
  width: 100%;
}

.clay-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px rgba(23,38,32,0.35), 8px 8px 20px rgba(23,38,32,0.18);
}

.clay-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(23,38,32,0.3), 2px 2px 8px rgba(23,38,32,0.12);
}

/* ===== 页面骨架 ===== */
.page-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边导航 ===== */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #c8fee8 0%, #bce8f5 50%, #c8fae5 100%);
  border-right: var(--border-w) solid var(--ink);
  box-shadow: 4px 0 20px rgba(23,38,32,0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 20px 24px;
  gap: 20px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--ink-light);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  border-radius: var(--radius-sm);
  border: 2px solid var(--ink);
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 4px 0;
}

.brand-name:hover {
  color: var(--ink-light);
}

/* details + summary + menu 结构 */
.nav-details {
  width: 100%;
}

.nav-details[open] .nav-summary::after {
  content: '▲';
}

.nav-summary {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  user-select: none;
}

.nav-summary::after {
  content: '▼';
  font-size: 0.65rem;
}

.nav-summary::-webkit-details-marker {
  display: none;
}

.nav-menu {
  list-style: none;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1.3;
}

.nav-link:hover {
  background: rgba(255,255,255,0.6);
  border-color: var(--ink);
  transform: translateX(4px);
}

.sidebar-cta {
  width: 100%;
  margin-top: auto;
}

/* ===== 主内容包裹 ===== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== Hero ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 24px 0;
  background: linear-gradient(135deg, #c0fee8 0%, #b6e8f5 40%, #c8fce6 100%);
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  padding: 48px 32px;
  max-width: 680px;
  margin: 0 auto;
}

.hero-icon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, var(--mint) 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-outer), var(--shadow-inner);
  animation: floatBubble 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

.bubble-lg {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  animation-delay: 0s;
}

.bubble-sm {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  animation-delay: 0.4s;
  transform: translateY(-8px);
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.bubble-sm {
  animation: floatBubbleSm 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite 0.4s;
}

@keyframes floatBubbleSm {
  0%, 100% { transform: translateY(-8px); }
  50% { transform: translateY(-18px); }
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-h1 {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--ink-light);
  line-height: 1.7;
  max-width: 520px;
}

/* ===== 正文主区域 ===== */
.content-main {
  flex: 1;
  padding: 32px 24px;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* figure 装饰条 */
.content-figure {
  grid-column: 1 / -1;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(90deg, var(--mint) 0%, var(--fog) 100%);
  border-radius: var(--radius-md);
}

.figure-deco {
  display: flex;
  gap: 10px;
  align-items: center;
}

.deco-circle {
  display: inline-block;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--ink);
}

.c1 { width: 32px; height: 32px; background: #ffffff; }
.c2 { width: 24px; height: 24px; background: var(--mint); }
.c3 { width: 18px; height: 18px; background: var(--fog); }

/* 正文区 */
.content-body {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

/* 侧边栏 aside */
.content-aside {
  grid-column: 2;
  grid-row: 2;
  padding: 24px 20px;
  background: linear-gradient(160deg, #d0fff0 0%, #c8eaf7 100%);
  height: fit-content;
  position: sticky;
  top: 24px;
}

.aside-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.aside-lead {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 16px;
  line-height: 1.5;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aside-link {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition);
  min-height: 40px;
  line-height: 1.4;
}

.aside-link:hover {
  background: rgba(255,255,255,0.65);
  border-color: var(--ink);
}

/* ===== page.content 内的章节样式 ===== */
.content-body div {
  scroll-margin-top: 80px;
  margin-bottom: 48px;
  padding: 32px 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.7) 0%, rgba(180,253,225,0.3) 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-outer), var(--shadow-inner);
}

.content-body div:last-child {
  margin-bottom: 0;
}

.content-body h2 {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.content-body h2 + p,
.content-body .subtitle,
.content-body .subhead,
.content-body .desc,
.content-body .lead {
  color: var(--ink-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.content-body h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 24px 0 10px;
}

.content-body p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}

.content-body ul,
.content-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-body li {
  margin-bottom: 8px;
  line-height: 1.7;
  font-size: 1rem;
}

.content-body a {
  color: var(--ink);
  text-underline-offset: 3px;
  font-weight: 500;
}

.content-body a:hover {
  color: var(--ink-light);
}

.content-body strong {
  font-weight: 700;
  color: var(--ink);
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-outer);
}

/* ===== scroll-margin-top for sections ===== */
div[id] {
  scroll-margin-top: 24px;
}

/* ===== 页脚 ===== */
.site-footer {
  margin: 32px 24px 24px;
  background: linear-gradient(145deg, var(--ink) 0%, #1e3a2f 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-outer);
  padding: 48px 40px 32px;
  color: var(--mint);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 2px solid rgba(180,253,225,0.2);
}

.footer-big-brand {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--mint);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  opacity: 0.85;
}

.footer-brand-desc {
  font-size: 0.9rem;
  color: rgba(180,253,225,0.7);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.addr-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: rgba(173,216,230,0.6);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.addr-link {
  color: var(--fog);
  text-decoration: none;
  font-size: 0.9rem;
}

.addr-link:hover {
  color: var(--mint);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(173,216,230,0.6);
  letter-spacing: 0.08em;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav-list li a {
  display: flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--mint);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(180,253,225,0.1);
  transition: color var(--transition), padding-left var(--transition);
  min-height: 44px;
  line-height: 1.4;
}

.footer-nav-list li a:hover {
  color: #ffffff;
  padding-left: 8px;
}

.footer-bottom {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: rgba(180,253,225,0.6);
}

.footer-note {
  font-size: 0.78rem;
  color: rgba(173,216,230,0.4);
}

/* ===== Scroll Reveal 动效 ===== */
.reveal-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bubble,
  .bubble-sm {
    animation: none;
  }
  .clay-btn {
    transition: none;
  }
  .nav-link {
    transition: none;
  }
}

/* ===== 响应式：平板 ===== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-figure {
    grid-column: 1;
  }
  .content-body {
    grid-column: 1;
    grid-row: auto;
  }
  .content-aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: unset;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 8px;
    border-right: none;
    border-bottom: var(--border-w) solid var(--ink);
    z-index: 200;
    overflow-y: visible;
  }

  .sidebar-brand {
    padding-bottom: 0;
    border-bottom: none;
    flex: 0 0 auto;
  }

  .brand-name {
    font-size: 1rem;
    padding: 8px 4px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-details {
    flex: 1;
    min-width: 0;
  }

  .nav-summary {
    background: rgba(255,255,255,0.5);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--ink);
    min-height: 44px;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #c8fde8 0%, #bce8f5 100%);
    border: var(--border-w) solid var(--ink);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 8px 12px 12px;
    z-index: 300;
    gap: 2px;
  }

  .nav-link {
    padding: 12px 14px;
    min-height: 44px;
  }

  .sidebar-cta {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    white-space: nowrap;
    padding: 10px 16px;
    min-height: 44px;
  }

  .main-wrapper {
    margin-left: 0;
    padding-top: 80px;
  }

  .hero-section {
    min-height: 60vh;
    margin: 8px 12px 0;
  }

  .hero-inner {
    padding: 32px 20px;
  }

  .content-main {
    padding: 20px 12px;
  }

  .content-body div {
    padding: 20px 16px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }

  .site-footer {
    margin: 20px 12px 12px;
    padding: 32px 20px 24px;
  }

  .footer-big-brand {
    font-size: 2.5rem;
  }

  div[id] {
    scroll-margin-top: 90px;
  }
}

/* ===== 细节修饰 ===== */
::selection {
  background: var(--mint);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 区块分隔线 */
.content-body div + div {
  position: relative;
}

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