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

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  color: #000;
  font-family: 'Noto Sans Thai', system-ui, -apple-system, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }

/* ---------- 左侧固定竖排导航 ---------- */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.75rem 1.5rem 1.5rem;
  background: #fff;
  border-right: 1px solid #000;
  overflow-y: auto;
}

.railTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 3px solid #000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.mark {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.35rem;
  border: 1px solid #000;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 0;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.railNav p {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0;
}

.railNav a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.6rem 0.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 500;
  transition: transform 0.25s ease;
}

.railNav a:hover,
.railNav a:focus-visible { transform: translateX(5px); }

.num {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.45;
}

.railFoot { margin-top: auto; }

.contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-weight: 700;
}

.contact:hover { background: #fff; color: #000; box-shadow: inset 0 0 0 2px #000; }

main { margin-left: 300px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 45vh;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  background: #000;
  color: #fff;
}

.mega {
  position: absolute;
  left: -0.06em;
  right: 0;
  bottom: -0.16em;
  margin: 0;
  font-size: clamp(4rem, 15vw, 11rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.5);
  pointer-events: none;
  user-select: none;
}

.mega span { display: inline-block; }

.heroInner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: end;
}

.collage { display: flex; gap: 0.6rem; align-items: flex-start; }

.shot {
  width: 46%;
  max-width: 190px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  background: #111;
  filter: grayscale(1) contrast(1.15);
}

.shot.s2 { transform: translateY(1.4rem); }

.hero h1 {
  font-size: clamp(2rem, 6.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------- 正文骨架 ---------- */
.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
}

.doc { padding: clamp(2.5rem, 6vw, 6rem) 0; }

article {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.side {
  position: sticky;
  top: 2rem;
  padding-top: 1rem;
  border-top: 3px solid #000;
}

.side h2 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.sideLinks a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 500;
}

.sideLinks a:hover { opacity: 0.55; }

.toTop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 1.1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #000;
  border-radius: 4px;
  font-weight: 700;
}

/* ---------- 正文排版 ---------- */
.prose { max-width: 68ch; }

.prose div {
  padding: clamp(2.25rem, 5vw, 4.5rem) 0;
  border-top: 1px solid #000;
  scroll-margin-top: 2rem;
}

.prose div:first-child { padding-top: 0; border-top: 0; }

.prose h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(1.65rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.prose h3 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.45rem; }

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 0 1rem 1.2rem;
  border-left: 4px solid #000;
  font-weight: 500;
}

.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { background: #000; color: #fff; text-decoration: none; }
.prose img { margin: 1.2rem 0; border-radius: 4px; }
.prose table { width: 100%; margin: 1.2rem 0; border-collapse: collapse; }
.prose th, .prose td { padding: 0.6rem; border: 1px solid #000; text-align: left; }
.prose th { font-weight: 700; background: #000; color: #fff; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid #000;
  padding-bottom: 1.5rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.25rem, 4vw, 4rem);
  background: #000;
  color: #fff;
}

.cta h2 {
  font-size: clamp(2rem, 7vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.cta a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1.3rem;
  border: 1px solid #fff;
  border-radius: 4px;
  font-weight: 700;
}

.cta a:hover { background: #fff; color: #000; }

.footRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  padding: 2rem clamp(1.25rem, 4vw, 4rem);
}

.footBrand a { font-size: 1.25rem; font-weight: 900; letter-spacing: -0.04em; }

.footNav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
  margin: 0;
  max-width: 46rem;
}

.footNav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.4rem 0;
  font-weight: 500;
}

.footNav a:hover { opacity: 0.55; }

.copy {
  margin: 0;
  padding: 1.1rem clamp(1.25rem, 4vw, 4rem);
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
}

/* ---------- 滚动显现 ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.rv.in { opacity: 1; transform: none; }

/* ---------- 移动端 ---------- */
@media (max-width: 880px) {
  .rail {
    position: sticky;
    top: 0; left: auto; bottom: auto;
    width: auto;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem 0.9rem;
    border-right: 0;
    border-bottom: 1px solid #000;
    overflow: visible;
  }

  .railTop { border-bottom: 0; padding-bottom: 0; }
  .burger { display: inline-flex; }

  .railNav {
    display: none;
    max-height: 58vh;
    overflow-y: auto;
    padding-top: 0.5rem;
    border-top: 1px solid #000;
  }

  .rail.open .railNav { display: block; }

  .railFoot { display: flex; margin-top: 0; }

  .contact { min-height: 42px; padding: 0.35rem 1rem; font-size: 0.95rem; }

  main { margin-left: 0; }
  article { grid-template-columns: 1fr; gap: 2rem; }
  .side { position: static; top: auto; }
  .sideLinks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; }

  .hero { min-height: 38vh; }
  .prose div { scroll-margin-top: 160px; }
  .prose { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .railNav a { transition: none; }
}

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