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

:root{
  --ink:#000;
  --paper:#fff;
  --line:rgba(0,0,0,.16);
  --soft:rgba(0,0,0,.62);
  --font:"Noto Sans Thai",system-ui,-apple-system,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font);
  font-size:17px;
  line-height:1.68;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%}
a{color:inherit}
p{margin:0 0 1.1rem}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
[id]{scroll-margin-top:96px}

/* ---------- left rail ---------- */
.rail{
  position:fixed;
  z-index:60;
  top:0;
  bottom:0;
  left:0;
  width:178px;
  display:flex;
  flex-direction:column;
  gap:.1rem;
  padding:1rem .8rem 1.1rem;
  background:var(--paper);
  border-right:1px solid var(--ink);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.rail__brand{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  margin-bottom:1.1rem;
  background:var(--ink);
  color:var(--paper);
  border-radius:4px;
  text-decoration:none;
  font-weight:700;
  font-size:1.1rem;
  line-height:1;
  letter-spacing:-.02em;
}
.rail__logo{width:24px;height:24px;object-fit:contain;filter:grayscale(1) invert(1)}
.rail__links{display:flex;flex-direction:column;gap:.05rem;flex:1 1 auto}
.rail a.rail__a{
  display:flex;
  align-items:center;
  gap:.55rem;
  min-height:44px;
  padding:.55rem .5rem;
  border:1px solid transparent;
  border-radius:4px;
  color:var(--ink);
  text-decoration:none;
  font-size:.95rem;
  line-height:1.35;
}
.rail__dot{
  flex:0 0 auto;
  width:7px;
  height:7px;
  background:var(--ink);
  border-radius:50%;
}
.rail a.rail__a:hover,
.rail a.rail__a:focus-visible{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.rail a.rail__a:hover .rail__dot,
.rail a.rail__a:focus-visible .rail__dot{background:var(--paper)}
.rail__cta{
  margin-top:1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:.6rem .7rem;
  background:var(--ink);
  color:var(--paper);
  border-radius:4px;
  font-weight:700;
  font-size:.95rem;
  text-decoration:none;
  white-space:nowrap;
}
.rail__cta:hover{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 2px var(--ink)}

/* ---------- hero ---------- */
.hero{
  position:relative;
  min-height:100svh;
  display:grid;
  place-items:center;
  background:#000;
  color:#fff;
  overflow:hidden;
  isolation:isolate;
}
.hero__fig{position:absolute;inset:0;margin:0;z-index:-3;overflow:hidden}
.hero__img{
  position:absolute;
  top:-12%;
  left:0;
  width:100%;
  height:124%;
  object-fit:cover;
  filter:grayscale(1) contrast(1.08);
  opacity:.58;
  will-change:transform;
}
.hero__mask{
  position:absolute;
  inset:0;
  z-index:-2;
  background:
    radial-gradient(120% 85% at 50% 42%,rgba(0,0,0,.2),rgba(0,0,0,.86) 72%),
    linear-gradient(180deg,rgba(0,0,0,.72),rgba(0,0,0,.22) 45%,#000);
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.075) 1px,transparent 1px);
  background-size:74px 74px;
  -webkit-mask-image:radial-gradient(72% 62% at 50% 50%,#000,transparent 78%);
  mask-image:radial-gradient(72% 62% at 50% 50%,#000,transparent 78%);
}
.hero__copy{
  position:relative;
  z-index:2;
  width:100%;
  padding:6rem 1.25rem;
  text-align:center;
}
.hero__h1{
  margin:0 auto;
  max-width:16ch;
  font-size:clamp(2.6rem,10vw,9rem);
  font-weight:900;
  letter-spacing:-.05em;
  line-height:.95;
  text-wrap:balance;
  text-shadow:0 10px 46px rgba(0,0,0,.55);
}

/* ---------- stage / aside / prose ---------- */
.stage{
  display:grid;
  grid-template-columns:1fr;
  gap:1.75rem;
  max-width:1180px;
  margin:0 auto;
  padding:2.5rem 1.15rem 4.5rem;
}
.side{
  border:1px solid var(--ink);
  border-radius:4px;
  padding:1.1rem 1rem 1.2rem;
  background:var(--paper);
}
.side__h{
  margin:0 0 .7rem;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.22em;
}
.side__h > span{display:inline-block}
.side__list{
  list-style:none;
  margin:0;
  padding:0;
  counter-reset:snav;
}
.side__list li + li{border-top:1px solid var(--line)}
.side__list a{
  display:flex;
  align-items:baseline;
  gap:.5rem;
  min-height:42px;
  padding:.5rem 0;
  font-size:.95rem;
  line-height:1.45;
  text-decoration:none;
}
.side__list a::before{
  counter-increment:snav;
  content:counter(snav,decimal-leading-zero);
  flex:0 0 auto;
  font-size:.75rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  letter-spacing:.05em;
}
.side__list a:hover{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}

.prose{min-width:0}
.prose div{
  background:var(--paper);
  border:1px solid var(--ink);
  border-radius:4px;
  padding:1.9rem 1.15rem 1.3rem;
  margin:0 0 1.4rem;
  box-shadow:0 30px 64px -46px rgba(0,0,0,.7);
}
.prose h2{
  margin:0 0 1.2rem;
  font-size:clamp(1.7rem,4.4vw,2.9rem);
  font-weight:900;
  letter-spacing:-.04em;
  line-height:1.06;
  text-wrap:balance;
}
.prose h2 > span,.prose h3 > span{display:inline-block}
.prose h3{
  margin:1.9rem 0 .8rem;
  font-size:clamp(1.25rem,2.6vw,1.7rem);
  font-weight:700;
  letter-spacing:-.02em;
  line-height:1.2;
}
.prose p{max-width:64ch;line-height:1.85}
.prose ul,.prose ol{padding-left:1.35rem;margin:0 0 1.2rem;max-width:64ch}
.prose li{margin-bottom:.5rem;line-height:1.8}
.prose a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px;font-weight:500}
.prose a:hover{background:var(--ink);color:var(--paper);text-decoration:none}
.prose strong{font-weight:700}
.prose blockquote{
  margin:0 0 1.3rem;
  padding:.15rem 0 .15rem 1.1rem;
  border-left:3px solid var(--ink);
  font-weight:500;
}
.prose img{display:block;height:auto;border-radius:4px;margin:0 0 1.2rem}
.prose figure{margin:0 0 1.3rem}
.prose figcaption{font-size:.9rem;color:var(--soft);margin-top:.5rem}
.prose table{width:100%;border-collapse:collapse;margin:0 0 1.3rem;font-size:.98rem}
.prose th,.prose td{border:1px solid var(--ink);padding:.55rem .7rem;text-align:left;vertical-align:top}
.prose th{background:var(--ink);color:var(--paper);font-weight:700}
.prose time{font-variant-numeric:tabular-nums;font-weight:500}
.prose hr{border:0;border-top:1px solid var(--ink);margin:1.6rem 0}
.prose code,.prose pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em}
.prose pre{overflow-x:auto;background:#000;color:#fff;padding:1rem;border-radius:4px}

/* ---------- footer ---------- */
.foot{
  position:relative;
  background:var(--ink);
  color:var(--paper);
  padding:3.5rem 1.15rem 1.6rem;
  overflow:hidden;
}
.foot::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px);
  background-size:64px 64px;
  -webkit-mask-image:linear-gradient(180deg,#000,transparent 70%);
  mask-image:linear-gradient(180deg,#000,transparent 70%);
}
.foot div{position:relative;max-width:1180px;margin:0 auto}
.foot__big{
  margin:0 0 1.2rem;
  font-size:clamp(2.1rem,9vw,6.4rem);
  font-weight:900;
  letter-spacing:-.055em;
  line-height:.94;
  word-break:break-word;
}
.foot__desc{
  max-width:48ch;
  margin:0 0 2.6rem;
  color:rgba(255,255,255,.72);
  line-height:1.75;
}
.foot__h{
  margin:0 0 .6rem;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.22em;
  color:rgba(255,255,255,.8);
}
.foot__h > span{display:inline-block}
.foot__nav dl{
  display:grid;
  grid-template-columns:1fr auto;
  margin:0;
  padding:0;
}
.foot__nav dt{margin:0}
.foot__nav dd{
  margin:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding:0 0 0 .8rem;
  font-size:.9rem;
  color:rgba(255,255,255,.55);
}
.foot__nav a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:.55rem 0;
  color:var(--paper);
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.22);
}
.foot__nav dd{border-bottom:1px solid rgba(255,255,255,.22)}
.foot__nav a:hover{color:#fff;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}
.foot__bar{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:.8rem;
  max-width:1180px;
  margin:3rem auto 0;
  padding-top:1.2rem;
  border-top:1px solid rgba(255,255,255,.28);
  font-size:.9rem;
  color:rgba(255,255,255,.66);
}
.foot__copy{margin:0}
.foot__bot{display:flex;flex-wrap:wrap;gap:.6rem;margin:0}
.foot__bot a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:.4rem .8rem;
  color:var(--paper);
  text-decoration:none;
  border:1px solid rgba(255,255,255,.34);
  border-radius:4px;
}
.foot__bot a:hover{background:var(--paper);color:var(--ink);border-color:var(--paper)}

/* ---------- reveal ---------- */
.js .rv{opacity:0;transform:translateY(22px);transition:opacity .6s ease,transform .6s ease}
.js .rv.in{opacity:1;transform:none}

/* ---------- breakpoints ---------- */
@media (max-width:959px){
  .rail{
    top:0;
    bottom:auto;
    left:0;
    right:0;
    width:auto;
    flex-direction:row;
    align-items:center;
    gap:.4rem;
    padding:.4rem .55rem;
    border-right:0;
    border-bottom:1px solid var(--ink);
    overflow:visible;
  }
  .rail__brand{width:42px;height:42px;margin:0;font-size:1rem}
  .rail__links{
    flex-direction:row;
    align-items:center;
    gap:.1rem;
    overflow-x:auto;
    scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }
  .rail a.rail__a{padding:.5rem .55rem;white-space:nowrap;font-size:.9rem}
  .rail__cta{margin:0;flex:0 0 auto;padding:.5rem .7rem;font-size:.9rem}
  .hero{padding-top:4.4rem}
  .hero__copy{padding:4rem 1.15rem 4.6rem}
  .hero__h1{font-size:clamp(2.4rem,12.5vw,5rem)}
  .foot__nav dd{display:none}
}
@media (min-width:960px){
  body{font-size:17.5px}
  main{margin-left:178px}
  .stage{grid-template-columns:186px minmax(0,1fr);gap:3.4rem;padding:5.5rem 2.6rem 7rem}
  .side{position:sticky;top:2rem;align-self:start}
  .prose div{padding:3.2rem 2.8rem 2rem;margin-bottom:2.4rem}
  .foot{padding:6rem 2.6rem 2rem;margin-left:178px}
  .foot__nav dl{grid-template-columns:1fr auto 1fr auto;column-gap:2.4rem}
  .foot__nav dd{display:flex}
  [id]{scroll-margin-top:26px}
}
@media (min-width:1280px){
  .hero__h1{font-size:clamp(4rem,9.2vw,10rem)}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .js .rv{opacity:1;transform:none;transition:none}
  .hero__img{transform:none!important}
}

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