@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ============================================================
   CSS 自定义属性
   ============================================================ */
:root {
  --c-bg: #fafaf8;
  --c-mid: #4a4a4a;
  --c-ink: #1a1a1a;
  --c-accent: #c0392b;
  --c-accent2: #7d6b5a;
  --c-border: rgba(26,26,26,0.18);
  --c-shadow: rgba(26,26,26,0.12);
  --sidebar-w: 220px;
  --font-main: 'Noto Sans KR', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 10px;
  --paper-noise: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(26,26,26,0.015) 2px,
    rgba(26,26,26,0.015) 4px
  );
}

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

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

body {
  background-color: var(--c-bg);
  background-image: var(--paper-noise);
  color: var(--c-ink);
  font-family: var(--font-main);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(180,160,130,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(120,100,80,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ============================================================
   布局骨架
   ============================================================ */
.page-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   侧边导航 aside > nav > ul > li > a
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--c-ink);
  background-image:
    var(--paper-noise),
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 2px solid rgba(255,255,255,0.07);
  transform: rotate(-0.1deg);
}

.sidebar nav {
  flex: 1;
  padding: 2rem 0 1.5rem;
}

.sidebar nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 所有导航链接：统一 min-height 44px 保证 tap 区域 */
.sidebar nav ul li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: rgba(250,250,248,0.75);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: none;
  border-left: 3px solid transparent;
  min-height: 44px;
  line-height: 1.4;
}

.sidebar nav ul li a:hover {
  color: var(--c-bg);
  background: rgba(255,255,255,0.06);
  border-left-color: var(--c-accent);
  transform: translateX(2px) rotate(0.2deg);
}

/* 品牌项 */
.brand-item {
  margin-bottom: 1.5rem;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px dashed rgba(255,255,255,0.15);
}

.brand-link {
  display: block;
  padding: 0.75rem 0 !important;
  border-left: none !important;
  background: none !important;
  min-height: 44px !important;
}

.brand-text {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-bg);
  letter-spacing: 0.08em;
  line-height: 1.4;
  border-bottom: 2px solid var(--c-accent);
  padding-bottom: 0.25rem;
}

.brand-logo {
  width: auto;
  height: 40px;
  object-fit: contain;
}

/* CTA 按钮项 */
.cta-item {
  margin-top: 1.5rem;
  padding: 0 1.25rem;
}

.cta-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  background: var(--c-accent) !important;
  color: #fff !important;
  border-radius: 4px !important;
  padding: 0 1rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  border-left: none !important;
  min-height: 44px !important;
  height: 44px !important;
  transform: rotate(-0.3deg) !important;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4) !important;
}

.cta-btn:hover {
  background: #a93226 !important;
  transform: rotate(-0.3deg) translate(-1px, -1px) !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5) !important;
}

/* ============================================================
   主内容区
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.wrap {
  width: 100%;
}

/* ============================================================
   Hero 区块
   ============================================================ */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--c-border);
  position: relative;
  overflow: hidden;
  background-image: var(--paper-noise);
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,26,26,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,26,26,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem;
  gap: 3rem;
  position: relative;
}

.hero-text {
  flex: 0 0 50%;
  max-width: 520px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  border: 1px solid var(--c-accent);
  padding: 0.25rem 0.6rem;
  margin-bottom: 1.25rem;
  transform: rotate(-0.5deg);
  background: rgba(192,57,43,0.06);
}

.hero-h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-ink);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  text-shadow: 2px 2px 0 rgba(26,26,26,0.08);
}

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

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 0 2rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 2px solid var(--c-ink);
  box-shadow: 4px 4px 0 var(--c-mid);
  transform: rotate(-0.4deg);
  min-height: 44px;
  height: 44px;
  transition: none;
}

.hero-cta:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 6px 6px 0 rgba(192,57,43,0.3);
  transform: rotate(-0.4deg) translate(-2px, -2px);
}

.hero-media {
  flex: 0 0 44%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.hero-bg-text {
  position: absolute;
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 700;
  color: rgba(26,26,26,0.05);
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
  transform: rotate(-8deg);
  z-index: 0;
  line-height: 1;
}

.hero-img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(26,26,26,0.15), 0 0 0 2px var(--c-border);
  transform: rotate(1.2deg);
  filter: contrast(1.04) saturate(0.9);
}

.hero-placeholder {
  width: 100%;
  max-width: 340px;
  height: 300px;
  border: 2px dashed var(--c-border);
  border-radius: var(--radius);
  transform: rotate(1deg);
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(26,26,26,0.03) 8px,
    rgba(26,26,26,0.03) 16px
  );
}

/* ============================================================
   正文内容区 main > section.wrap > article > div
   ============================================================ */
.content-section {
  padding: 0;
}

.content-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 3rem;
}

.content-body article {
  scroll-margin-top: 90px;
  padding: 3rem 0 2.5rem;
  border-bottom: 1px dashed var(--c-border);
  position: relative;
}

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

.content-body article::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 3rem;
  height: calc(100% - 5.5rem);
  width: 2px;
  background: linear-gradient(180deg, var(--c-accent) 0%, transparent 100%);
  opacity: 0.4;
}

.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.content-body h3 {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--c-mid);
  margin: 1.5rem 0 0.75rem;
}

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

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

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

.content-body ol li {
  list-style: decimal;
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.content-body a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(192,57,43,0.35);
}

.content-body a:hover {
  border-bottom-color: var(--c-accent);
}

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

.content-body small,
small.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  margin-bottom: 0.4rem;
  opacity: 0.85;
}

.content-body .card {
  background: rgba(255,255,255,0.6);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 3px 3px 8px var(--c-shadow);
  transform: rotate(-0.2deg);
}

/* ============================================================
   页脚 footer 三栏 dl
   ============================================================ */
.site-footer {
  background: var(--c-ink);
  background-image: var(--paper-noise);
  color: rgba(250,250,248,0.75);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 3rem 2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
}

.site-footer dl dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-bg);
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-footer dl dd {
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
  color: rgba(250,250,248,0.6);
}

.site-footer dl dd a {
  color: rgba(250,250,248,0.65);
  transition: none;
}

.site-footer dl dd a:hover {
  color: var(--c-bg);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(250,250,248,0.45);
}

.footer-note {
  font-size: 0.75rem;
  color: rgba(250,250,248,0.35);
  letter-spacing: 0.04em;
}

/* ============================================================
   汉堡菜单（移动端）
   ============================================================ */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--c-ink);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-bg);
  border-radius: 1px;
}

/* ============================================================
   Scroll Reveal 动效（原生 JS）
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px) rotate(0.3deg);
  transition: none;
}

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

.reveal-list > * {
  opacity: 0;
  transform: translateY(16px);
}

.reveal-list.visible > *:nth-child(1) { opacity: 1; transform: translateY(0); }
.reveal-list.visible > *:nth-child(2) { opacity: 1; transform: translateY(0); }
.reveal-list.visible > *:nth-child(3) { opacity: 1; transform: translateY(0); }
.reveal-list.visible > *:nth-child(4) { opacity: 1; transform: translateY(0); }
.reveal-list.visible > *:nth-child(5) { opacity: 1; transform: translateY(0); }
.reveal-list.visible > *:nth-child(n+6) { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-list > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   article 的 scroll-margin-top
   ============================================================ */
article[id] {
  scroll-margin-top: 80px;
}

/* ============================================================
   响应式断点
   ============================================================ */
@media (max-width: 900px) {
  :root { --sidebar-w: 180px; }

  .hero-inner {
    padding: 3rem 2rem;
    gap: 2rem;
  }

  .content-body {
    padding: 2.5rem 2rem;
  }

  .footer-inner {
    padding: 2.5rem 2rem 1.5rem;
  }
}

@media (max-width: 680px) {
  :root { --sidebar-w: 0px; }

  .menu-toggle { display: flex; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%) rotate(0deg);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    z-index: 150;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 140;
  }

  .sidebar-overlay.open {
    display: block;
  }

  /* 移动端导航链接确保足够高度 */
  .sidebar nav ul li a {
    min-height: 48px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

  .main-content {
    margin-left: 0;
  }

  .hero-inner {
    flex-direction: column-reverse;
    padding: 4rem 1.25rem 2.5rem;
    gap: 1.5rem;
    min-height: 70vh;
  }

  .hero-text {
    flex: none;
    max-width: 100%;
  }

  .hero-media {
    flex: none;
    width: 100%;
    min-height: 200px;
  }

  .hero-bg-text {
    font-size: clamp(3.5rem, 18vw, 6rem);
  }

  .hero-img {
    max-width: 100%;
    transform: rotate(0.8deg);
  }

  .content-body {
    padding: 2rem 1.25rem;
  }

  .content-body article::before {
    display: none;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .footer-inner {
    padding: 2rem 1.25rem 1.5rem;
  }
}

@media (max-width: 375px) {
  .hero-h1 { font-size: 1.75rem; }
  .hero-inner { padding: 4.5rem 1rem 2rem; }
  .content-body { padding: 1.5rem 1rem; }
}

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