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

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

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

body {
  font-family: 'Noto Serif TC', 'Noto Sans TC', serif;
  background: #ffffff;
  color: #000000;
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: 60px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── 滚动偏移（底部固定条高度） ── */
article[id] {
  scroll-margin-top: 72px;
}

/* ── 全站容器 ── */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── 全屏遮罩菜单 ── */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: #000000;
  color: #ffffff;
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

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

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.overlay-close span {
  display: block;
  width: 20px;
  height: 1px;
  background: #ffffff;
}

.overlay-close span:first-child {
  transform: rotate(45deg) translateY(3.5px);
}

.overlay-close span:last-child {
  transform: rotate(-45deg) translateY(-3.5px);
}

.overlay-aside {
  text-align: center;
}

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

.overlay-aside nav ul li {
  border-top: 1px solid rgba(255,255,255,0.15);
}

.overlay-aside nav ul li:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.nav-link {
  display: block;
  padding: 1.1rem 3rem;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #ffffff;
  transition: color 200ms ease, padding-left 200ms ease;
  min-height: 44px;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #cccccc;
  padding-left: 3.5rem;
  outline: none;
}

/* ── 主体 ── */
main {
  flex: 1;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */
.hero-section {
  border-bottom: 1px solid #000000;
  padding: 3rem 0 2.5rem;
  min-height: 45vh;
  display: flex;
  align-items: center;
}

.hero-article {
  width: 100%;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.hero-text {
  text-align: right;
  max-width: 640px;
}

.hero-text h1 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.hero-desc {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: #333333;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.hero-media {
  flex-shrink: 0;
}

.hero-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.hero-icon-fallback {
  width: 72px;
  height: 72px;
  border: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ── 内容区 ── */
.content-section {
  padding: 3rem 0 4rem;
}

.content-article {
  width: 100%;
}

.content-body {
  font-family: 'Noto Serif TC', serif;
  font-size: 1rem;
  line-height: 1.85;
  color: #111111;
}

/* 正文内 article 排版 */
.content-body article {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.content-body h2 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.content-body h2 + hr {
  border: none;
  border-top: 2px solid #000000;
  margin-bottom: 1.4rem;
}

.content-body h3 {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.5rem;
}

.content-body h3 + hr {
  border: none;
  border-top: 1px solid #000000;
  margin-bottom: 1rem;
}

.content-body p {
  margin-bottom: 1rem;
}

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

.content-body ul {
  list-style: disc;
}

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

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

.content-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover {
  opacity: 0.65;
}

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

.content-body blockquote {
  border-left: 3px solid #000000;
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: #444444;
  font-style: italic;
}

/* ── 页脚 ── */
.site-footer {
  border-top: 2px solid #000000;
  background: #000000;
  color: #ffffff;
}

.footer-cta {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-cta-text {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}

.footer-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo a {
  display: flex;
  align-items: center;
}

.brand-text,
.bottom-brand-text {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: invert(1);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  justify-content: center;
}

.footer-nav a {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: #cccccc;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.25rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 200ms ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-copy {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 0.75rem;
  color: #888888;
  white-space: nowrap;
  text-align: right;
}

/* ── 底部固定导航条 ── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #ffffff;
  border-top: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 100;
}

.bottom-bar-brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.25rem;
}

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

.hamburger {
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid #000000;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  transition: background 200ms ease;
}

.hamburger:hover {
  background: #000000;
}

.hamburger:hover span {
  background: #ffffff;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: #000000;
  transition: background 200ms ease;
}

/* ── Scroll Reveal 动效 ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 400ms ease, transform 400ms ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .stagger li {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 300ms ease, transform 300ms ease;
  }

  .stagger.is-visible li {
    opacity: 1;
    transform: none;
  }

  .stagger.is-visible li:nth-child(1) { transition-delay: 0ms; }
  .stagger.is-visible li:nth-child(2) { transition-delay: 60ms; }
  .stagger.is-visible li:nth-child(3) { transition-delay: 120ms; }
  .stagger.is-visible li:nth-child(4) { transition-delay: 180ms; }
  .stagger.is-visible li:nth-child(5) { transition-delay: 240ms; }
  .stagger.is-visible li:nth-child(6) { transition-delay: 300ms; }
  .stagger.is-visible li:nth-child(7) { transition-delay: 360ms; }
}

/* ── 断点：桌面 ── */
@media (min-width: 768px) {
  body {
    padding-bottom: 60px;
  }

  .wrap {
    padding: 0 3rem;
  }

  .hero-text h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }

  .hero-icon {
    width: 100px;
    height: 100px;
  }

  .overlay-aside nav ul li {
    border-top-color: rgba(255,255,255,0.12);
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 1.2rem 4rem;
  }

  .content-body {
    font-size: 1.05rem;
  }

  .content-body h2 {
    font-size: 1.6rem;
  }

  .footer-bar {
    padding: 1.4rem 3rem;
  }

  .bottom-bar {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .content-body {
    max-width: 800px;
  }

  .content-section .content-article {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-link {
    font-size: 1.4rem;
  }
}

/* ── 移动端精调 ── */
@media (max-width: 480px) {
  .hero-inner {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 1.2rem;
  }

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

  .footer-bar {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    text-align: center;
    gap: 0.8rem;
    padding: 1rem;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-logo a {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
    white-space: normal;
  }
}

/* ── 焦点可见性 ── */
:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

/* ── 卡片（content 内若有） ── */
.content-body .card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 220ms ease;
}

.content-body .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

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