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

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

html {
  scroll-behavior: smooth;
  background: #fdfbf7;
  color: #1a1a1a;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: .01em;
  color: #1a1a1a;
  background-color: #fdfbf7;
  background-image: radial-gradient(#ded8cb 1px, transparent 1px);
  background-size: 22px 22px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}

a { color: #1a1a1a; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 3px;
}

/* 顶部两行：品牌行 + 菜单行 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fdfbf7;
  border-bottom: 1px solid #ddd7cb;
}

.mast-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .06em;
}
.brand img {
  display: block;
  width: 26px;
  height: 26px;
  border: 1px solid #ddd7cb;
  border-radius: 8px;
}

.mast-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #1a1a1a;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  background: #fdfbf7;
}
.mast-contact:hover { background: #1a1a1a; color: #fdfbf7; }

.mast-menu {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 8px;
}
.mast-menu p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid #ece7dc;
}
.mast-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  letter-spacing: .03em;
  color: #46443f;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.mast-menu a:hover { color: #1a1a1a; border-bottom-color: #1a1a1a; }

/* 首屏 */
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 62px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 40px;
  align-items: center;
  min-height: calc(100vh - 142px);
  border-bottom: 1px solid #ddd7cb;
  border-radius: 0 0 56px 56px;
  background-image: radial-gradient(#d7d1c4 1px, transparent 1px);
  background-size: 20px 20px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.6vw, 3.05rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}

.hero-desc {
  max-width: 44ch;
  margin: 0 0 26px;
  font-size: 17px;
  color: #45433e;
}

.hero-jump {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid #1a1a1a;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fdfbf7;
  font-size: 16px;
  letter-spacing: .08em;
  text-decoration: none;
}
.hero-jump:hover { background: #fdfbf7; color: #1a1a1a; }

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid #ddd7cb;
  border-radius: 28px;
  overflow: hidden;
  background: #f5f5f5;
  background-image: radial-gradient(#d5cfc2 1px, transparent 1px);
  background-size: 16px 16px;
}
.hero-fig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  will-change: transform;
}
.hero-fig figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 3px 14px;
  border: 1px solid #ddd7cb;
  border-radius: 999px;
  background: #fdfbf7;
  font-size: 14px;
  letter-spacing: .06em;
}

/* 正文 + 右侧栏 */
.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 20px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 44px;
  align-items: start;
}

.prose { grid-column: 1; min-width: 0; }

.rail {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 138px;
  padding: 16px 16px 18px;
  border: 1px solid #ded8cc;
  border-radius: 28px;
  background: #f5f5f5;
  background-image: radial-gradient(#e0dace 1px, transparent 1px);
  background-size: 18px 18px;
}

.rail-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .14em;
}
.rail-title > span {
  display: inline;
  padding-bottom: 2px;
  border-bottom: 2px solid #1a1a1a;
}

.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: #3b3934;
  text-decoration: none;
  border-bottom: 1px dashed #d8d2c5;
}
.rail-list li:last-child a { border-bottom: 0; }
.rail-list a:hover { color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; }

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 正文区块：描边圆角卡片 */
.prose > section {
  margin: 0 0 26px;
  padding: 28px 26px;
  border: 1px solid #e2ddd2;
  border-radius: 28px;
  background: #fdfbf7;
  scroll-margin-top: 152px;
}
.prose > section:nth-child(even) { background: #f7f6f2; }
.prose > section:last-child { margin-bottom: 0; }

.prose h2 {
  margin: 0 0 .7em;
  font-size: clamp(1.28rem, 2.4vw, 1.62rem);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .01em;
}
.prose h2 > span,
.prose h3 > span {
  display: inline;
  padding-bottom: 2px;
  border-bottom: 2px solid #1a1a1a;
}
.prose h3 {
  margin: 1.3em 0 .55em;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 700;
}
.prose p { margin: 0 0 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.35em; }
.prose li { margin: 0 0 .45em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1.05em;
  border: 1px solid #e2ddd2;
  border-radius: 16px;
}
.prose blockquote {
  margin: 0 0 1.05em;
  padding: 2px 0 2px 18px;
  border-left: 2px solid #1a1a1a;
  color: #403e39;
}
.prose figure { margin: 0 0 1.05em; }
.prose figcaption { font-size: 15px; color: #5d5a53; }

/* 页脚三栏 */
.colophon {
  margin-top: 54px;
  border-top: 1px solid #ddd7cb;
  background-color: #f5f5f5;
  background-image: radial-gradient(#e2dccf 1px, transparent 1px);
  background-size: 20px 20px;
}

.foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 44px;
  display: grid;
  grid-template-columns: 1.1fr 1fr .8fr;
  gap: 32px;
  align-items: start;
}

.foot-brand h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .06em;
}
.foot-brand h2 a { text-decoration: none; }

.foot-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: #4a4842;
  text-decoration: none;
}
.foot-nav a:hover { color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; }

.sub-label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: .1em;
}
.sub-row { display: flex; gap: 8px; }
.sub-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: #1a1a1a;
  background: #fdfbf7;
  border: 1px solid #cfc9bc;
  border-radius: 14px;
}
.sub-btn {
  min-height: 46px;
  padding: 0 22px;
  font: inherit;
  font-size: 16px;
  letter-spacing: .08em;
  color: #fdfbf7;
  background: #1a1a1a;
  border: 1px solid #1a1a1a;
  border-radius: 14px;
  cursor: pointer;
}
.sub-btn:hover { background: #fdfbf7; color: #1a1a1a; }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  color: #4a4842;
}
.foot-legal p { margin: 0; }
.foot-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 进入视口显现 */
.rv {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .16s linear, transform .16s linear;
}
.rv.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    min-height: 0;
    padding: 26px 20px 44px;
    border-radius: 0 0 34px 34px;
  }
  .hero-fig { aspect-ratio: 16 / 10; }
  .doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding-top: 30px;
  }
  .prose { grid-column: 1; }
  .rail { grid-column: 1; grid-row: 1; position: static; }
  .prose > section { padding: 22px 18px; border-radius: 22px; scroll-margin-top: 132px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .mast-menu p { gap: 0 16px; }
}

@media (max-width: 420px) {
  .mast-top { padding: 10px 16px 4px; }
  .mast-menu { padding: 0 16px 8px; }
  .hero { padding: 22px 16px 38px; }
  .doc { padding: 26px 16px 8px; }
  .foot-inner { padding: 28px 16px 36px; }
  .hero-jump { width: 100%; justify-content: center; }
}

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

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