@import url('https://fonts.googleapis.com/css2?family=Karla:wght@300;400;500;600;700&family=Playfair+Display+SC:wght@400;700&display=swap');

/* ===========================
   CSS 变量 & 基础重置
=========================== */
:root {
  --primary: #c8e0f4;
  --secondary: #f5e0e8;
  --ink: #171f26;
  --ink-soft: #3a4a5a;
  --ink-muted: #6b7e90;
  --bg: #c8e0f4;
  --bg-light: #dceef8;
  --bg-card: #cfe4f6;
  --shadow-dark: rgba(23, 31, 38, 0.18);
  --shadow-light: rgba(255, 255, 255, 0.82);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-card: 4px;
  --bottom-bar-h: 64px;
  --font-head: 'Playfair Display SC', Georgia, serif;
  --font-body: 'Karla', system-ui, sans-serif;
  --transition: 150ms ease;
  --max-content: 1100px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg);
}

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

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

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  opacity: 0.75;
}

ul {
  list-style: none;
}

/* ===========================
   Neumorphism 工具类
=========================== */
.neu-raised {
  box-shadow:
    -5px -5px 15px var(--shadow-light),
    5px 5px 15px var(--shadow-dark);
}

.neu-inset {
  box-shadow:
    inset -3px -3px 8px var(--shadow-light),
    inset 3px 3px 8px var(--shadow-dark);
}

.neu-card {
  background: linear-gradient(145deg, var(--bg-light), var(--bg-card));
  border-radius: var(--radius);
  box-shadow:
    -5px -5px 15px var(--shadow-light),
    5px 5px 15px var(--shadow-dark);
  padding: 1.5rem;
}

.neu-btn {
  display: inline-block;
  background: linear-gradient(145deg, var(--bg-light), var(--primary));
  border: none;
  border-radius: var(--radius);
  box-shadow:
    -4px -4px 12px var(--shadow-light),
    4px 4px 12px var(--shadow-dark);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.75rem 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
  text-align: center;
  letter-spacing: 0.03em;
}

.neu-btn:hover {
  box-shadow:
    -6px -6px 18px var(--shadow-light),
    6px 6px 18px var(--shadow-dark);
  opacity: 1;
}

.neu-btn:active {
  box-shadow:
    inset -3px -3px 8px var(--shadow-light),
    inset 3px 3px 8px var(--shadow-dark);
  transform: scale(0.97);
}

.neu-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--bg-light), var(--primary));
  border: none;
  border-radius: 10px;
  box-shadow:
    -3px -3px 8px var(--shadow-light),
    3px 3px 8px var(--shadow-dark);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.neu-btn-sm:active {
  box-shadow:
    inset -2px -2px 6px var(--shadow-light),
    inset 2px 2px 6px var(--shadow-dark);
  transform: scale(0.95);
}

.neu-input {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-light));
  border: none;
  border-radius: var(--radius-sm);
  box-shadow:
    inset -3px -3px 8px var(--shadow-light),
    inset 3px 3px 8px var(--shadow-dark);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 1rem;
  width: 100%;
  outline: none;
  transition: box-shadow var(--transition);
}

.neu-input:focus {
  box-shadow:
    inset -2px -2px 5px var(--shadow-light),
    inset 2px 2px 5px rgba(23,31,38,0.28);
}

/* ===========================
   全屏遮罩菜单
=========================== */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.overlay-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: linear-gradient(145deg, var(--bg-light), var(--primary));
  border: none;
  border-radius: 50%;
  box-shadow:
    -4px -4px 10px var(--shadow-light),
    4px 4px 10px var(--shadow-dark);
  color: var(--ink);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.overlay-close:active {
  transform: scale(0.93);
  box-shadow:
    inset -2px -2px 6px var(--shadow-light),
    inset 2px 2px 6px var(--shadow-dark);
}

.overlay-aside {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
}

.overlay-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.overlay-link {
  display: block;
  background: linear-gradient(145deg, var(--bg-light), var(--bg-card));
  border-radius: var(--radius);
  box-shadow:
    -4px -4px 12px var(--shadow-light),
    4px 4px 12px var(--shadow-dark);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  text-align: center;
  letter-spacing: 0.04em;
  transition: box-shadow var(--transition), transform var(--transition);
}

.overlay-link:hover {
  box-shadow:
    -6px -6px 18px var(--shadow-light),
    6px 6px 18px var(--shadow-dark);
  opacity: 1;
}

.overlay-link:active {
  box-shadow:
    inset -3px -3px 8px var(--shadow-light),
    inset 3px 3px 8px var(--shadow-dark);
  transform: scale(0.97);
}

/* ===========================
   Hero 区
=========================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 1.5rem calc(var(--bottom-bar-h) + 2rem);
  background: linear-gradient(135deg, var(--primary) 0%, #d8ecff 60%, var(--secondary) 100%);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
}

.hero-text {
  flex: 1 1 50%;
  text-align: center;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
}

.hero-media {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  border-radius: var(--radius);
  box-shadow:
    -8px -8px 24px var(--shadow-light),
    8px 8px 24px var(--shadow-dark);
  max-height: 70vh;
  object-fit: cover;
  width: 100%;
}

.hero-media-placeholder {
  width: 100%;
  min-height: 340px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--bg-light), var(--secondary));
  box-shadow:
    -8px -8px 24px var(--shadow-light),
    8px 8px 24px var(--shadow-dark);
}

/* ===========================
   正文主容器
=========================== */
.site-main {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 3rem 1.5rem calc(var(--bottom-bar-h) + 2rem);
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 2rem;
}

.content-figure {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.figure-deco {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  box-shadow:
    -2px -2px 6px var(--shadow-light),
    2px 2px 6px var(--shadow-dark);
  margin-bottom: 1.5rem;
}

.content-body {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.content-aside {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

/* 内容正文样式 */
.content-body h2 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.content-body h2 + hr,
.content-body h3 + hr {
  border: none;
  border-top: 2px solid rgba(23,31,38,0.12);
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 0 var(--shadow-light);
}

.content-body h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

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

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

.content-body li {
  margin-bottom: 0.4rem;
  list-style: disc;
}

.content-body ol li {
  list-style: decimal;
}

.content-body a {
  color: var(--ink);
  border-bottom: 1px solid rgba(23,31,38,0.3);
  transition: border-color var(--transition);
}

.content-body a:hover {
  border-color: var(--ink);
  opacity: 1;
}

.content-body div {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--bottom-bar-h) + 16px);
}

/* div 分隔 */
.content-body div + div {
  border-top: 1px solid rgba(23,31,38,0.08);
  padding-top: 2rem;
}

/* ===========================
   侧边栏 aside
=========================== */
.aside-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.content-aside hr {
  border: none;
  border-top: 1px solid rgba(23,31,38,0.15);
  margin-bottom: 1rem;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aside-link {
  display: block;
  background: linear-gradient(145deg, var(--bg-light), var(--bg-card));
  border-radius: var(--radius-sm);
  box-shadow:
    -2px -2px 6px var(--shadow-light),
    2px 2px 6px var(--shadow-dark);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition), color var(--transition), transform var(--transition);
}

.aside-link:hover {
  color: var(--ink);
  box-shadow:
    -3px -3px 9px var(--shadow-light),
    3px 3px 9px var(--shadow-dark);
  opacity: 1;
}

.aside-link:active {
  box-shadow:
    inset -2px -2px 5px var(--shadow-light),
    inset 2px 2px 5px var(--shadow-dark);
  transform: scale(0.97);
}

/* ===========================
   页脚
=========================== */
.site-footer {
  background: linear-gradient(160deg, var(--ink) 0%, #2a3a4a 100%);
  color: rgba(255,255,255,0.85);
  padding-bottom: calc(var(--bottom-bar-h) + 1rem);
}

.footer-top {
  padding: 3rem 1.5rem 2rem;
  max-width: var(--max-content);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.footer-col hr {
  border: none;
  border-top: 1px solid rgba(200,224,244,0.2);
  margin-bottom: 1rem;
}

.footer-about {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-list li a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition);
  display: block;
  padding: 0.2rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-nav-list li a:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.footer-address a {
  color: var(--secondary);
}

.footer-address a:hover {
  opacity: 0.85;
}

.footer-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.5rem;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.footer-form .footer-input {
  background: rgba(200,224,244,0.1);
  border: 1px solid rgba(200,224,244,0.2);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  width: 100%;
  outline: none;
  box-shadow: none;
  transition: border-color var(--transition);
}

.footer-form .footer-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.footer-form .footer-input:focus {
  border-color: var(--primary);
}

.footer-form .footer-btn {
  background: linear-gradient(145deg, #3a5a7a, #2a4a6a);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow:
    -3px -3px 8px rgba(255,255,255,0.08),
    3px 3px 8px rgba(0,0,0,0.35);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  width: 100%;
  min-height: 44px;
}

.footer-form .footer-btn:active {
  transform: scale(0.97);
  box-shadow:
    inset -2px -2px 5px rgba(255,255,255,0.08),
    inset 2px 2px 5px rgba(0,0,0,0.4);
}

.footer-social-list {
  display: flex;
  gap: 0.75rem;
}

.footer-social-list a {
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-bottom {
  background: rgba(0,0,0,0.25);
  text-align: center;
  padding: 1rem 1.5rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* ===========================
   底部固定导航条
=========================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--bottom-bar-h);
  background: linear-gradient(145deg, var(--bg-light), var(--primary));
  box-shadow:
    0 -4px 16px var(--shadow-dark),
    0 -1px 0 var(--shadow-light);
}

.bottom-bar-aside {
  height: 100%;
}

.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 0.5rem;
  max-width: var(--max-content);
  margin: 0 auto;
}

.bottom-nav-left,
.bottom-nav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.bottom-nav-right {
  justify-content: flex-end;
}

.bottom-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  transition: box-shadow var(--transition), color var(--transition), transform var(--transition);
  box-shadow:
    -2px -2px 5px var(--shadow-light),
    2px 2px 5px var(--shadow-dark);
  background: linear-gradient(145deg, var(--bg-light), var(--primary));
}

.bottom-nav-link:hover {
  color: var(--ink);
  box-shadow:
    -3px -3px 8px var(--shadow-light),
    3px 3px 8px var(--shadow-dark);
  opacity: 1;
}

.bottom-nav-link:active {
  box-shadow:
    inset -2px -2px 5px var(--shadow-light),
    inset 2px 2px 5px var(--shadow-dark);
  transform: scale(0.95);
}

.bottom-bar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 0.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.site-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hamburger-icon {
  font-size: 1.2rem;
  line-height: 1;
}

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

/* ===========================
   HR 样式
=========================== */
hr {
  border: none;
  border-top: 1px solid rgba(23,31,38,0.12);
  margin: 0.5rem 0 1rem;
}

/* ===========================
   Scroll Reveal 动画
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .overlay-menu {
    transition: none;
  }
}

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

  .content-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .content-figure {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .content-body {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .content-aside {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-media {
    width: 100%;
    max-height: 40vh;
  }

  .hero-media-placeholder {
    min-height: 200px;
  }

  .bottom-nav-link {
    font-size: 0.68rem;
    padding: 0.5rem 0.45rem;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-h1 {
    font-size: 1.7rem;
  }

  .bottom-nav-left,
  .bottom-nav-right {
    gap: 0.15rem;
  }

  .bottom-nav-link {
    font-size: 0.62rem;
    padding: 0.5rem 0.35rem;
    min-height: 44px;
    min-width: 40px;
  }

  .overlay-aside {
    padding: 1.25rem;
  }

  .overlay-link {
    font-size: 1.05rem;
    padding: 0.85rem 1.2rem;
  }

  .site-main {
    padding: 2rem 1rem calc(var(--bottom-bar-h) + 1.5rem);
  }

  .footer-top {
    padding: 2rem 1rem 1.5rem;
  }
}

@media (max-width: 375px) {
  :root {
    --bottom-bar-h: 60px;
  }

  .hero-section {
    padding: 1.5rem 1rem calc(var(--bottom-bar-h) + 1.5rem);
  }

  .hero-h1 {
    font-size: 1.45rem;
  }

  .bottom-nav-link {
    font-size: 0.58rem;
    padding: 0.5rem 0.25rem;
    min-height: 44px;
  }
}

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