@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* =====================
   CSS 自定义属性
   ===================== */
:root {
  --c-bg: #fafaf8;
  --c-mid: #4a4a4a;
  --c-ink: #1a1a1a;
  --c-accent: #3a3a3a;
  --c-card: #f0ede8;
  --c-line: #c8c4bc;
  --c-white: #ffffff;
  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 60px;
  --radius-card: 18px;
  --max-content: 900px;
  --max-wide: 1200px;
}

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

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

body.body-root {
  font-family: var(--font-main);
  background-color: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 400px 400px;
}

section[id] {
  scroll-margin-top: 20px;
  scroll-margin-bottom: calc(var(--nav-h) + 20px);
}

a {
  color: var(--c-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

ul, menu {
  list-style: none;
}

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

/* =====================
   页面包装
   ===================== */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}

/* =====================
   底部固定导航条
   ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--c-ink);
  color: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-top: 2px solid var(--c-mid);
  box-shadow: 0 -3px 0 #2a2a2a, 0 -5px 0 rgba(255,255,255,0.04);
}

.nav-details {
  position: relative;
}

.nav-details[open] > .nav-dropdown {
  display: block;
}

.nav-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
  padding: 4px;
}
.nav-summary::-webkit-details-marker { display: none; }
.nav-summary::marker { display: none; }

.nav-summary:hover,
.nav-summary:focus-visible {
  background: rgba(255,255,255,0.12);
  outline: 2px dashed var(--c-line);
  outline-offset: 2px;
}

.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-bg);
  border-radius: 1px;
  transform-origin: center;
}
.nav-hamburger span:nth-child(1) { transform: rotate(-0.8deg); }
.nav-hamburger span:nth-child(2) { width: 16px; transform: rotate(0.5deg); }
.nav-hamburger span:nth-child(3) { transform: rotate(-0.3deg); }

.nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
}
.nav-logo-mark {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.nav-brand-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-bg);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.nav-dropdown {
  position: absolute;
  bottom: calc(var(--nav-h) + 4px);
  background: var(--c-bg);
  border: 2px solid var(--c-ink);
  border-radius: var(--radius-card);
  padding: 8px 0;
  min-width: 150px;
  box-shadow: 4px -4px 0 var(--c-ink);
  display: none;
}
.nav-dropdown--left { left: 0; }
.nav-dropdown--right { right: 0; }

.nav-dropdown li {
  border-bottom: 1px dashed var(--c-line);
}
.nav-dropdown li:last-child { border-bottom: none; }

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
  transition: background 0.1s;
  min-height: 44px;
}
.nav-link:hover {
  background: var(--c-card);
  text-decoration: none;
}

/* =====================
   Hero 区块
   ===================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  position: relative;
}

.hero-figure {
  flex: 1 1 50%;
  margin: 0;
  overflow: hidden;
  background: var(--c-card);
  position: relative;
}
.hero-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) saturate(0.85);
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 18px,
      rgba(74,74,74,0.07) 18px,
      rgba(74,74,74,0.07) 19px
    ),
    var(--c-card);
}

.hero-aside {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-mid);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--c-mid);
  padding-bottom: 4px;
  transform: rotate(-0.5deg);
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-ink);
  margin-bottom: 20px;
  transform: rotate(-0.3deg);
}

.hero-desc {
  font-size: 1rem;
  color: var(--c-mid);
  max-width: 380px;
  line-height: 1.75;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  background: var(--c-ink);
  color: var(--c-bg);
  font-weight: 700;
  font-size: 0.97rem;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--c-mid);
  transform: rotate(0.4deg);
  transition: transform 0.1s, box-shadow 0.1s;
  min-height: 48px;
}
.hero-cta:hover {
  transform: rotate(-0.3deg) translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--c-mid);
  text-decoration: none;
}

/* =====================
   主内容区
   ===================== */
.main-content {
  flex: 1 1 auto;
  padding: 48px 20px 64px;
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
}

.content-section {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  position: relative;
}

.content-body {
  flex: 1 1 0;
  min-width: 0;
  order: 1;
}

.content-aside {
  flex: 0 0 220px;
  width: 220px;
  order: 3;
  position: sticky;
  top: 20px;
}

/* 装饰用 figure（满足正文容器契约） */
.content-deco {
  display: none;
  order: 2;
  margin: 0;
}
.deco-mark {
  display: block;
  width: 0;
  height: 0;
}

.aside-inner {
  background: var(--c-card);
  border: 2px solid var(--c-ink);
  border-radius: var(--radius-card);
  padding: 20px 18px;
  box-shadow: 3px 3px 0 var(--c-ink);
  transform: rotate(0.5deg);
}

.aside-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-mid);
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--c-line);
  padding-bottom: 8px;
}

.aside-nav-list li {
  border-bottom: 1px dashed var(--c-line);
}
.aside-nav-list li:last-child { border-bottom: none; }

.aside-nav-list a {
  display: flex;
  align-items: center;
  padding: 8px 4px;
  font-size: 0.88rem;
  color: var(--c-ink);
  text-decoration: none;
  line-height: 1.5;
  min-height: 44px;
  transition: color 0.1s;
}
.aside-nav-list a:hover {
  color: var(--c-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =====================
   正文内容样式
   ===================== */
.content-body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--c-ink);
  margin-top: 2.5em;
  margin-bottom: 0.4em;
  transform: rotate(-0.2deg);
  display: inline-block;
}

.content-body h2 + hr,
.content-body h3 + hr {
  border: none;
  border-top: 2px solid var(--c-ink);
  margin-bottom: 1.2em;
  opacity: 0.35;
  transform: scaleX(0.98) rotate(0.1deg);
}

hr {
  border: none;
  border-top: 1.5px dashed var(--c-line);
  margin: 1.5em 0;
}

.content-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-top: 2em;
  margin-bottom: 0.4em;
}

.content-body p {
  margin-bottom: 1.2em;
  line-height: 1.8;
  font-size: 1rem;
}

.content-body ul, .content-body ol {
  margin: 0.8em 0 1.2em 1.4em;
  list-style: disc;
}
.content-body ol { list-style: decimal; }

.content-body li {
  margin-bottom: 0.4em;
  line-height: 1.7;
}

.content-body a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.content-body a:hover {
  color: var(--c-mid);
}

.content-body blockquote {
  border-left: 3px solid var(--c-ink);
  padding: 8px 16px;
  margin: 1.5em 0;
  background: var(--c-card);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--c-mid);
}

.content-body figure {
  margin: 1.5em 0;
  text-align: center;
}
.content-body figure img {
  border-radius: var(--radius-card);
  border: 2px solid var(--c-line);
}
.content-body figcaption {
  font-size: 0.83rem;
  color: var(--c-mid);
  margin-top: 6px;
}

.content-body aside {
  background: var(--c-card);
  border: 1.5px dashed var(--c-line);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin: 1.5em 0;
  font-size: 0.93rem;
  color: var(--c-mid);
}

.content-body section {
  margin-bottom: 3em;
  padding-top: 1em;
}

/* =====================
   页脚
   ===================== */
.site-footer {
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 0 0 calc(var(--nav-h) + 24px);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.footer-brand-section,
.footer-desc-section,
.footer-nav-section,
.footer-copy-section {
  position: relative;
  z-index: 1;
}

.footer-brand-section {
  padding: 56px 40px 24px;
  border-bottom: 1px solid rgba(250,250,248,0.12);
}

.footer-brand-giant {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--c-bg);
  letter-spacing: -0.02em;
  line-height: 1;
  transform: rotate(-0.5deg);
  display: inline-block;
  opacity: 0.9;
}

.footer-desc-section {
  padding: 24px 40px;
  border-bottom: 1px solid rgba(250,250,248,0.12);
}
.footer-desc-text {
  font-size: 0.93rem;
  color: rgba(250,250,248,0.6);
  max-width: 600px;
  line-height: 1.7;
}

.footer-nav-section {
  padding: 24px 40px;
  border-bottom: 1px solid rgba(250,250,248,0.12);
}
.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-nav-list a {
  color: rgba(250,250,248,0.75);
  font-size: 0.9rem;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.footer-nav-list a:hover {
  color: var(--c-bg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy-section {
  padding: 20px 40px 0;
}
.footer-copy {
  font-size: 0.82rem;
  color: rgba(250,250,248,0.4);
}

/* =====================
   视差 & 微交互
   ===================== */
@media (prefers-reduced-motion: no-preference) {
  .hero-figure {
    will-change: transform;
  }

  .aside-inner {
    transition: transform 0.18s cubic-bezier(.3,.7,.4,1), box-shadow 0.18s;
  }
  .aside-inner:hover {
    transform: rotate(-0.3deg) translateY(-2px);
    box-shadow: 5px 5px 0 var(--c-ink);
  }

  .content-body > * {
    animation: fadeSlideUp 0.4s ease both;
  }
  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-section {
    perspective: 600px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* =====================
   响应式
   ===================== */
@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    min-height: auto;
  }
  .hero-figure {
    flex: 0 0 50vw;
    height: 50vw;
    max-height: 380px;
    width: 100%;
  }
  .hero-aside {
    flex: none;
    padding: 40px 28px;
  }
  .content-section {
    flex-direction: column;
    gap: 28px;
  }
  .content-aside {
    flex: none;
    width: 100%;
    order: -1;
    position: static;
  }
  .aside-inner {
    transform: none;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-h: 56px;
  }

  html { font-size: 16px; }

  .hero-figure {
    height: 55vw;
  }
  .hero-aside {
    padding: 32px 20px;
  }
  .hero-title {
    font-size: 1.55rem;
  }
  .hero-cta {
    width: 100%;
    text-align: center;
    transform: none;
  }

  .main-content {
    padding: 32px 16px 48px;
  }

  .footer-brand-section { padding: 36px 20px 20px; }
  .footer-desc-section,
  .footer-nav-section,
  .footer-copy-section { padding-left: 20px; padding-right: 20px; }

  .footer-brand-giant {
    font-size: clamp(2rem, 12vw, 3.5rem);
  }

  .nav-brand-text {
    font-size: 0.9rem;
  }

  .nav-dropdown {
    min-width: 130px;
  }
}

@media (min-width: 1400px) {
  .hero-aside {
    padding: 80px 80px;
  }
}
