html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

:root {
  --ink: #171f26;
  --ink-soft: #4a5a68;
  --bg: #eef3f8;
  --bg-2: #e7eff7;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --r: 28px;
  --sh-out: -7px -7px 18px rgba(255, 255, 255, 0.95), 9px 9px 24px rgba(23, 31, 38, 0.13);
  --sh-out-sm: -4px -4px 12px rgba(255, 255, 255, 0.9), 5px 5px 14px rgba(23, 31, 38, 0.11);
  --sh-in: inset -4px -4px 10px rgba(255, 255, 255, 0.9), inset 4px 4px 10px rgba(23, 31, 38, 0.12);
  --serif: "Noto Serif TC", "Songti TC", "PingFang TC", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-underline-offset: 4px;
}

a {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #7fa8c9;
  outline-offset: 3px;
}

svg {
  display: block;
}

/* ---------- 顶部 ---------- */

.site-top {
  background: linear-gradient(180deg, #f3f8fc 0%, var(--bg) 100%);
}

.strip {
  margin: 0;
  padding: 9px 16px;
  text-align: center;
  font-size: 16px;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.masthead {
  max-width: 1140px;
  margin: 0 auto;
  padding: 6px clamp(14px, 4vw, 32px) 14px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 20px 7px 9px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(145deg, #f7fbfe, #e1ebf5);
  box-shadow: var(--sh-out-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.brand:active {
  box-shadow: var(--sh-in);
  transform: scale(0.985);
}

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
}

.logo-dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--blue), var(--pink));
  box-shadow: var(--sh-in);
}

.navwrap {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(238, 243, 248, 0.97), rgba(238, 243, 248, 0.88));
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 22px rgba(23, 31, 38, 0.07);
}

.menu {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px clamp(14px, 4vw, 32px);
}

.menu ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  background: linear-gradient(145deg, #f7fbfe, #e3edf7);
  box-shadow: var(--sh-out-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.menu a:hover {
  transform: translateY(-1px);
}

.menu a:active {
  box-shadow: var(--sh-in);
  transform: scale(0.97);
}

.ico {
  width: 10px;
  height: 10px;
  fill: currentColor;
  opacity: 0.35;
  flex: none;
}

/* ---------- 首屏 ---------- */

main {
  display: block;
}

.hero {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  min-height: 70vh;
  padding: clamp(30px, 6vw, 70px) clamp(14px, 4vw, 32px) clamp(56px, 9vw, 96px);
  display: flex;
  align-items: center;
  background-image: radial-gradient(rgba(23, 31, 38, 0.11) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
}

.hero-text {
  position: relative;
  z-index: 3;
  max-width: 54%;
}

.hero h1 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.lead {
  margin: 0;
  max-width: 30em;
  font-size: 17px;
  color: var(--ink-soft);
}

.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: linear-gradient(145deg, #dce9f5, var(--pink));
  box-shadow: var(--sh-out);
}

.shot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero .shot {
  position: absolute;
  z-index: 2;
}

.shot-a {
  top: 9%;
  right: 17%;
  width: min(29%, 290px);
  aspect-ratio: 4 / 5;
  transform: rotate(-3.5deg);
  z-index: 1 !important;
}

.shot-b {
  right: 2%;
  bottom: 7%;
  width: min(24%, 240px);
  aspect-ratio: 1 / 1;
  transform: rotate(4deg);
}

/* ---------- 主体两栏 ---------- */

.board {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 52px) clamp(14px, 4vw, 32px) clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 96px;
  padding: 20px 16px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #f6fafd, #e4eef7);
  box-shadow: var(--sh-out-sm);
}

.rail-kicker {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.26em;
  color: var(--ink-soft);
}

.rail-head {
  margin: 2px 0 14px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.rail-list a:hover {
  color: var(--ink);
  background: rgba(200, 224, 244, 0.5);
}

.rail-list li:nth-child(2) { transition-delay: 40ms; }
.rail-list li:nth-child(3) { transition-delay: 80ms; }
.rail-list li:nth-child(4) { transition-delay: 120ms; }
.rail-list li:nth-child(5) { transition-delay: 160ms; }
.rail-list li:nth-child(6) { transition-delay: 200ms; }
.rail-list li:nth-child(7) { transition-delay: 240ms; }

.article {
  min-width: 0;
}

.content {
  counter-reset: sec;
}

.content > section {
  position: relative;
  counter-increment: sec;
  margin: 0 0 clamp(20px, 3vw, 30px);
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--r);
  background: linear-gradient(145deg, #f5fafe, #e6eef7);
  box-shadow: var(--sh-out);
  scroll-margin-top: 150px;
}

.content > section::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.18em;
  color: rgba(23, 31, 38, 0.24);
}

.content > section:nth-child(2) { transition-delay: 60ms; }
.content > section:nth-child(3) { transition-delay: 110ms; }
.content > section:nth-child(4) { transition-delay: 160ms; }
.content > section:nth-child(5) { transition-delay: 210ms; }
.content > section:nth-child(6) { transition-delay: 260ms; }
.content > section:nth-child(7) { transition-delay: 310ms; }

.content h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.content h3 {
  margin: 26px 0 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.5;
}

.content small {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.content small + h2 {
  margin-top: 2px;
}

.content p {
  margin: 0 0 1em;
}

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

.content ul,
.content ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.content li {
  margin: 0 0 0.45em;
}

.content a {
  color: #2c4a63;
  text-decoration-color: rgba(44, 74, 99, 0.4);
}

.content a:hover {
  text-decoration-color: currentColor;
}

.content blockquote {
  margin: 0 0 1em;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(245, 224, 232, 0.6);
  box-shadow: var(--sh-in);
}

.content blockquote p:last-child {
  margin-bottom: 0;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ---------- 页脚 ---------- */

footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 38px clamp(14px, 4vw, 32px) 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
}

footer small {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.22em;
  color: rgba(23, 31, 38, 0.45);
}

/* ---------- 回到顶部 ---------- */

.totop {
  position: fixed;
  right: clamp(14px, 4vw, 28px);
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  background: linear-gradient(145deg, #f8fbfe, #e0eaf5);
  box-shadow: var(--sh-out-sm);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.scrolled .totop {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.totop:active {
  box-shadow: var(--sh-in);
}

/* ---------- 动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.hero .shot-a.reveal.in {
  transform: rotate(-3.5deg);
}

.hero .shot-b.reveal.in {
  transform: rotate(4deg);
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
    order: 2;
  }

  .rail-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .rail-list a {
    padding: 8px 14px;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 999px;
  }
}

@media (max-width: 820px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    min-height: 0;
    padding-top: clamp(22px, 5vw, 36px);
    align-content: start;
  }

  .hero-text {
    grid-column: 1 / -1;
    max-width: none;
  }

  .lead {
    max-width: none;
  }

  .hero .shot {
    position: static;
    width: auto;
    aspect-ratio: 4 / 3;
    z-index: 1 !important;
  }

  .hero .shot-a.reveal.in {
    transform: rotate(-1.6deg);
  }

  .hero .shot-b.reveal.in {
    transform: rotate(1.6deg);
  }

  .hero .shot.reveal:not(.in) {
    transform: translateY(16px);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .strip {
    letter-spacing: 0.16em;
  }

  .brand-name {
    font-size: 20px;
  }

  .menu ol {
    gap: 6px;
  }

  .menu a {
    padding: 10px 14px;
    font-size: 16px;
  }

  .content > section::before {
    right: 18px;
    top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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