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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --grey: #6b6b6b;
  --hair: #d8d8d8;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans Thai", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --pad: clamp(16px, 4.4vw, 64px);
  --bar: 74px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
p, li, h1, h2, h3, dd, dt { overflow-wrap: break-word; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

button { font-family: inherit; }

/* ---------- 顶部细条与横条 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 70;
  background: var(--paper);
}

.ticker {
  border-bottom: 1px solid var(--ink);
  padding: 9px var(--pad) 8px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--bar);
  padding: 0 var(--pad);
  border-bottom: 2px solid var(--ink);
}

.brand {
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.18s linear, color 0.18s linear;
}

.burger i {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.burger:hover { background: var(--ink); color: var(--paper); }

/* ---------- 全屏遮罩菜单 ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad) 32px;
  background: var(--paper);
  overflow-y: auto;
  visibility: hidden;
  transform: translateY(-102%);
  transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), visibility 0s linear 0.5s;
}

.menu.is-open {
  visibility: visible;
  transform: none;
  transition: transform 0.5s cubic-bezier(0.22, 0.7, 0.2, 1), visibility 0s linear 0s;
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 2px solid var(--ink);
}

.menu-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.menu-close {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.18s linear, color 0.18s linear;
}

.menu-close:hover { background: var(--ink); color: var(--paper); }

.menu-nav { padding: clamp(16px, 4vw, 40px) 0 0; }

.menu-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 4vw, 56px);
}

.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: padding-left 0.2s ease;
}

.menu-nav a:hover { padding-left: 10px; }

.menu-nav .idx {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--grey);
}

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

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 45vh;
  padding: clamp(26px, 5vw, 52px) var(--pad);
  overflow: hidden;
  background: #0a0a0a;
  color: #ffffff;
  text-align: center;
}

.hero--bare {
  background-image: repeating-linear-gradient(90deg, #0a0a0a 0 1px, #191919 1px 44px);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transform: scale(1.12);
  will-change: transform;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.52));
}

.hero-num {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  margin: 0;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(140px, 30vw, 380px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-in { position: relative; z-index: 3; max-width: 40ch; }

.hero h1 {
  font-size: clamp(28px, 5.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-lead {
  margin: 14px auto 0;
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}

/* ---------- 正文栅格 ---------- */

.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  align-items: start;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 82px) var(--pad) clamp(48px, 7vw, 96px);
}

.sheet {
  min-width: 0;
  max-width: 72ch;
  counter-reset: sec;
}

.sheet div[id] {
  counter-increment: sec;
  scroll-margin-top: 148px;
  border-top: 2px solid var(--ink);
  padding-top: clamp(20px, 3vw, 30px);
  margin-bottom: clamp(44px, 6vw, 76px);
}

.sheet div[id]::before {
  content: "0" counter(sec);
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.86;
  letter-spacing: -0.05em;
}

.sheet div:last-child { margin-bottom: 0; }

.sheet h2 {
  font-size: clamp(24px, 3.4vw, 40px);
  margin-bottom: 10px;
}

.sheet h3 {
  font-size: clamp(19px, 2.2vw, 24px);
  margin: 28px 0 8px;
}

.sheet p {
  margin: 0 0 1.15em;
  text-wrap: pretty;
}

.sheet div[id] > p:first-of-type::first-letter {
  float: left;
  padding: 0.06em 0.12em 0 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.9em;
  line-height: 0.82;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--grey);
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.sheet li { margin-bottom: 0.45em; }

.sheet a {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.sheet a:hover { background: var(--ink); color: var(--paper); }

.sheet blockquote {
  margin: clamp(24px, 4vw, 40px) 0;
  padding: 2px 0 2px clamp(16px, 3vw, 30px);
  border-left: 6px solid var(--ink);
  font-family: var(--serif);
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.42;
}

.sheet blockquote p { margin: 0 0 0.6em; }
.sheet blockquote p:last-child { margin-bottom: 0; }

.sheet figure { margin: clamp(22px, 3.5vw, 36px) 0; }

.sheet figcaption {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hair);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--grey);
}

.sheet img { width: 100%; height: auto; }

.sheet hr {
  height: 0;
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 32px 0;
}

/* ---------- 右栏 ---------- */

.rail {
  position: sticky;
  top: calc(var(--bar) + 58px);
  border-top: 3px solid var(--ink);
  padding-top: 12px;
}

.rail-h { font-size: 22px; letter-spacing: -0.02em; }
.rail .subtitle { margin: 4px 0 14px; letter-spacing: 0.18em; }

.rail-nav ol { list-style: none; margin: 0; padding: 0; }

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: background 0.16s linear, color 0.16s linear;
}

.rail-nav a:hover { background: var(--ink); color: var(--paper); }

.rail-nav .idx {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--grey);
}

.rail-nav a:hover .idx { color: var(--paper); }

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

.foot {
  border-top: 3px solid var(--ink);
  padding: clamp(26px, 5vw, 52px) var(--pad) 18px;
}

.foot-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: start;
  gap: clamp(20px, 4vw, 48px);
  padding-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--hair);
}

.foot-word {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.foot-note {
  margin: 0;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey);
}

.foot-form {
  display: flex;
  border: 1px solid var(--ink);
}

.foot-form input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.foot-form input:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }

.foot-form button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.18s linear;
}

.foot-form button:hover { background: #2e2e2e; }

.foot-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 4vw, 38px) 0;
}

.foot-index dl { margin: 0; }

.foot-index dt {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--grey);
}

.foot-index dd { margin: 0; }

.foot-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid transparent;
}

.foot-index a:hover { border-bottom-color: var(--ink); }

.foot-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.foot-mark {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.to-top {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.18s linear, color 0.18s linear;
}

.to-top:hover { background: var(--ink); color: var(--paper); }

/* ---------- 入场 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

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

@media (max-width: 960px) {
  .spread { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: static;
    order: -1;
    border-top-width: 2px;
    margin-bottom: 8px;
  }
  .sheet { max-width: none; }
  .sheet div[id] { scroll-margin-top: 132px; }
}

@media (max-width: 780px) {
  .foot-lead { grid-template-columns: minmax(0, 1fr); }
  .menu-nav ol { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  :root { --bar: 64px; }
  .ticker { letter-spacing: 0.16em; }
  .foot-index { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .foot-index dl { border-top: 1px solid var(--hair); padding-top: 8px; }
  .foot-index dl:first-child { border-top: 0; padding-top: 0; }
  .hero-num { font-size: 40vw; }
  .sheet div[id] > p:first-of-type::first-letter { font-size: 3.4em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-img img { transform: none; }
  .menu { transition: none; }
  .menu-nav a, .burger, .foot-form button { transition: none; }
}

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