:root {
  --ink: #1f1f1f;
  --ink-mid: #3a3a3c;
  --ink-soft: #5f5f63;
  --line: rgba(31, 31, 31, 0.10);
  --bg: #f5f5f7;
  --paper: #ffffff;
  --card: rgba(255, 255, 255, 0.74);
  --rail: 264px;
  --radius: 10px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 14px 34px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 20px 34px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--ink);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 4px;
  background: var(--paper);
}

.rail-title {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
}

.rail-rule {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

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

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 16px;
  color: var(--ink-mid);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.rail-nav a::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.28;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--bg);
  color: var(--ink);
  transform: translateX(2px);
}

.rail-nav a:hover::before,
.rail-nav a:focus-visible::before {
  opacity: 1;
  transform: rotate(45deg);
}

/* ---------- 页面骨架 ---------- */
main {
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  min-height: 45vh;
  padding: 68px 0 46px;
  text-align: right;
}

.badge {
  position: absolute;
  left: 0;
  top: 22%;
  align-self: flex-start;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 14px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow);
  transform: rotate(-4deg);
  animation: floaty 7s ease-in-out infinite;
}

.hero-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.1rem, 6.2vw, 4.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lede {
  margin: 0;
  max-width: 38ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.08rem);
}

/* ---------- 正文：错落格子 ---------- */
.stage {
  padding-bottom: 10px;
}

.content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.content > article {
  position: relative;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  overflow-wrap: anywhere;
  scroll-margin-top: 96px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
  animation: rise 0.7s var(--ease) backwards;
}

.content > article:nth-child(odd) {
  grid-column: span 2;
}

.content > article:nth-child(1) { animation-delay: 0.04s; }
.content > article:nth-child(2) { animation-delay: 0.10s; }
.content > article:nth-child(3) { animation-delay: 0.16s; }
.content > article:nth-child(4) { animation-delay: 0.22s; }
.content > article:nth-child(5) { animation-delay: 0.28s; }
.content > article:nth-child(6) { animation-delay: 0.34s; }
.content > article:nth-child(7) { animation-delay: 0.40s; }

.content > article:hover {
  transform: scale(1.012);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.07), 0 24px 50px rgba(0, 0, 0, 0.08);
}

.content h2 {
  margin: 0 0 4px;
  font-size: clamp(1.35rem, 2.2vw, 1.72rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.content h2 + hr,
.content h3 + hr {
  margin: 0 0 14px;
  border: 0;
  border-top: 1px solid var(--line);
}

.content h3 {
  margin: 22px 0 6px;
  font-size: 1.15rem;
  line-height: 1.4;
}

.content p {
  margin: 0 0 14px;
  color: var(--ink-mid);
}

.content ul,
.content ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

.content li {
  margin: 0 0 6px;
}

.content a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--ink);
  border-radius: 0 8px 8px 0;
  background: var(--paper);
}

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

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  margin-top: 56px;
  padding: 26px clamp(18px, 4vw, 56px);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.foot-cta {
  flex: 1 1 220px;
  min-width: 0;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--ink);
}

.foot-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.foot-legal .top {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--ink-mid);
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floaty {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-7px); }
}

/* ---------- 平板 ---------- */
@media (max-width: 960px) {
  body {
    padding-left: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    inset: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .rail-title,
  .rail-rule {
    display: none;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 17px;
  }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rail-nav ul {
    flex-direction: row;
    gap: 4px;
  }

  .rail-nav a {
    min-height: 44px;
    padding: 0 10px;
    font-size: 15px;
    white-space: nowrap;
  }

  .rail-nav a:hover {
    transform: none;
  }

  .content > article {
    scroll-margin-top: 124px;
  }
}

/* ---------- 手机 ---------- */
@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding: 36px 0 30px;
    gap: 14px;
  }

  .badge {
    position: static;
    align-self: flex-start;
    transform: none;
    animation: none;
  }

  .hero-title {
    max-width: none;
  }

  .content {
    grid-template-columns: minmax(0, 1fr);
  }

  .content > article:nth-child(odd) {
    grid-column: auto;
  }

  .content > article:hover {
    transform: none;
  }

  .foot {
    justify-content: flex-start;
    gap: 10px 20px;
  }

  .foot-legal {
    align-items: flex-start;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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