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

:root{
  --p:#6514ff;
  --s:#bf00ff;
  --ink:#1c1726;
  --panel:#261d38;
  --panel2:#332748;
  --fg:#f0ebfa;
  --dim:#bcb0d6;
  --grad:linear-gradient(100deg,#6514ff,#bf00ff);
}

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

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

body{
  margin:0;
  font-family:'Noto Sans Thai',system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  font-size:17px;
  line-height:1.75;
  color:var(--fg);
  background:var(--ink);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:-30%;
  z-index:0;
  pointer-events:none;
  background-image:radial-gradient(rgba(191,0,255,.34) 1.5px,transparent 1.6px);
  background-size:24px 24px;
  opacity:.42;
  animation:drift 22s linear infinite;
}

@keyframes drift{to{transform:translate3d(-24px,-24px,0)}}

h1,h2,h3,h4,p,ul,menu,figure,address{margin:0}
ul,menu{padding:0;list-style:none}
a{color:inherit}
img{max-width:100%}
:focus-visible{outline:3px solid var(--s);outline-offset:3px}

/* 顶部细条 */
.ticker{
  position:relative;
  z-index:21;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 20px;
  background:var(--grad);
  color:#fff;
  font-size:16px;
  font-weight:500;
  letter-spacing:.08em;
}
.ticker .sep{
  flex:1;
  height:2px;
  background:rgba(255,255,255,.5);
  border-radius:2px;
}

/* 页头 */
.top{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px max(16px,calc((100% - 1140px) / 2));
  background:rgba(28,23,38,.95);
  backdrop-filter:blur(8px);
  border-bottom:2px solid var(--p);
}

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:0 4px;
  font-size:21px;
  font-weight:700;
  letter-spacing:-.4px;
  color:#fff;
  text-decoration:none;
}
.brand .mark{
  width:15px;
  height:15px;
  border-radius:3px;
  background:var(--grad);
  transform:rotate(45deg);
  transition:transform .25s ease;
}
.brand:hover .mark{transform:rotate(135deg) scale(1.15)}

/* 导航 */
.nav{position:relative}

.nav summary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:0 14px;
  border-radius:4px;
  background:var(--panel2);
  font-size:16px;
  font-weight:500;
  cursor:pointer;
  list-style:none;
}
.nav summary::-webkit-details-marker{display:none}
.nav summary::after{
  content:"+";
  font-weight:700;
  color:var(--s);
}
.nav[open] summary::after{content:"–"}

.nav menu{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.nav menu a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:8px 12px;
  border-radius:4px;
  color:var(--fg);
  font-size:17px;
  font-weight:500;
  text-decoration:none;
  transition:background-color .22s ease,color .22s ease,transform .22s ease;
}
.nav menu a .dot{
  width:8px;
  height:8px;
  flex:0 0 auto;
  background:var(--p);
  transform:rotate(45deg);
  transition:background-color .22s ease,transform .22s ease;
}
.nav menu a:hover{
  background:var(--grad);
  color:#fff;
  transform:translateX(3px);
}
.nav menu a:hover .dot{background:#fff;transform:rotate(135deg)}

@media (max-width:760px){
  .nav menu{
    position:absolute;
    right:0;
    top:calc(100% + 10px);
    width:min(80vw,320px);
    padding:10px;
    border-radius:4px;
    background:var(--panel2);
    box-shadow:0 20px 44px rgba(0,0,0,.55);
    border-top:3px solid var(--s);
  }
}

/* Hero */
.hero{
  position:relative;
  z-index:1;
  background:
    radial-gradient(circle at 12% 18%,rgba(101,20,255,.6),transparent 62%),
    radial-gradient(circle at 88% 4%,rgba(191,0,255,.5),transparent 58%),
    var(--ink);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 54px),0 100%);
}

.hero-in{
  display:grid;
  gap:28px;
  max-width:1140px;
  margin:0 auto;
  padding:48px 20px 86px;
  align-items:center;
}

.hero-txt{max-width:640px}

.hero h1{
  font-size:clamp(31px,7.4vw,56px);
  line-height:1.14;
  font-weight:700;
  letter-spacing:-1px;
  color:#fff;
  text-shadow:3px 3px 0 rgba(101,20,255,.55);
}

.hero .lede{
  margin-top:16px;
  max-width:48ch;
  font-size:17px;
  line-height:1.7;
  color:#d7cdea;
}

.hero-fig{margin:0}
.hero-fig .hero-img{
  display:block;
  width:100%;
  height:auto;
  border-radius:4px;
  box-shadow:14px 14px 0 rgba(191,0,255,.28);
}

/* 主体两栏 */
main{position:relative;z-index:1}
.wrap{
  display:grid;
  gap:44px;
  max-width:1140px;
  margin:0 auto;
  padding:52px 20px 68px;
}

.content{min-width:0}

.rail{
  padding:20px;
  border-radius:4px;
  background:var(--panel);
  box-shadow:inset 0 5px 0 0 var(--s);
}

.rail-h{
  font-size:20px;
  font-weight:700;
  letter-spacing:.04em;
}

.rail .subtitle{
  margin-top:2px;
  color:var(--dim);
  font-size:16px;
}

.rail-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.rail-list a{
  display:flex;
  align-items:center;
  min-height:40px;
  padding:6px 12px;
  border-radius:4px;
  background:var(--panel2);
  color:var(--fg);
  font-size:16px;
  text-decoration:none;
  transition:background-color .22s ease,color .22s ease;
}
.rail-list a:hover{background:var(--grad);color:#fff}

@media (min-width:900px){
  .hero-in{grid-template-columns:1.15fr .85fr;padding:56px 20px 96px}
  .wrap{grid-template-columns:238px minmax(0,1fr);gap:48px;align-items:start}
  .rail{position:sticky;top:96px}
  .rail-list{flex-direction:column;gap:0;margin-top:10px}
  .rail-list a{
    min-height:0;
    padding:9px 0;
    border-radius:0;
    background:none;
    border-bottom:1px dashed rgba(191,0,255,.35);
  }
  .rail-list li:last-child a{border-bottom:0}
  .rail-list a:hover{background:none;color:#e3c8ff;padding-left:6px}
}

/* 正文 */
.prose>article{
  position:relative;
  margin:0 0 48px;
  padding:26px 20px 30px;
  border-radius:4px;
  background:var(--panel);
  box-shadow:inset 6px 0 0 0 var(--p);
  scroll-margin-top:104px;
  transition:transform .25s ease,box-shadow .25s ease;
}
.prose>article:nth-child(even){box-shadow:inset 6px 0 0 0 var(--s)}
.prose>article:last-child{margin-bottom:0}
.prose>article:hover{transform:translateX(4px)}

.prose h2{
  font-size:clamp(24px,4.2vw,34px);
  line-height:1.24;
  font-weight:700;
  letter-spacing:-.5px;
  color:#fff;
  margin-bottom:14px;
}

.prose h3{
  margin:22px 0 8px;
  font-size:21px;
  line-height:1.35;
  color:#fff;
}

.prose p{margin:0 0 14px;font-size:17px;line-height:1.8}
.prose p:last-child{margin-bottom:0}

.prose .subtitle,
.prose .subhead,
.prose .lead,
.prose .desc{
  color:var(--dim);
  font-size:16px;
}

.prose ul,.prose ol{margin:0 0 16px;padding-left:22px;list-style:disc}
.prose ol{list-style:decimal}
.prose li{margin-bottom:6px}
.prose li::marker{color:var(--s)}

.prose strong{color:#fff}
.prose a{color:#e0b8ff;text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:#fff}

.prose img{display:block;height:auto;margin:16px 0;border-radius:4px}

.prose blockquote{
  margin:18px 0;
  padding:12px 16px;
  border-left:5px solid var(--s);
  background:var(--panel2);
  border-radius:4px;
}

/* 页脚 */
.foot{
  position:relative;
  z-index:1;
  margin-top:24px;
  padding:44px 20px 22px;
  background:#150f20;
}
.foot::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:var(--grad);
}
.foot-in{max-width:1140px;margin:0 auto}

.cta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:40px;
  padding:26px 22px;
  border-radius:4px;
  background:var(--grad);
  color:#fff;
}

.cta-k{
  font-size:16px;
  font-weight:500;
  letter-spacing:.14em;
  text-transform:none;
  opacity:.9;
}

.cta-a{
  display:inline-flex;
  align-items:center;
  min-height:48px;
  padding:4px 8px;
  font-size:clamp(22px,4.6vw,32px);
  font-weight:700;
  letter-spacing:-.4px;
  color:#fff;
  text-decoration:none;
  border-bottom:3px solid rgba(255,255,255,.7);
  transition:transform .22s ease,border-color .22s ease;
}
.cta-a:hover{transform:translateX(5px);border-color:#fff}

.foot-grid{display:grid;gap:32px}

.foot-brand address{
  font-style:normal;
  display:grid;
  gap:10px;
  max-width:44ch;
}

.fb-name{
  font-size:20px;
  font-weight:700;
  color:#fff;
  letter-spacing:-.3px;
}

.fb-desc{
  font-size:16px;
  line-height:1.7;
  color:var(--dim);
}

.foot-links ul{
  display:flex;
  flex-wrap:wrap;
  gap:6px 22px;
}

.foot-links a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  color:#ddd2ee;
  text-decoration:none;
  border-bottom:2px solid transparent;
  transition:color .22s ease,border-color .22s ease;
}
.foot-links a:hover{color:#fff;border-color:var(--s)}

.foot-bot{
  margin-top:30px;
  padding-top:18px;
  border-top:1px solid rgba(191,0,255,.28);
  text-align:center;
  font-size:16px;
  color:#a99cc4;
}

@media (min-width:760px){
  .foot-grid{grid-template-columns:1fr 1fr;gap:48px}
}

/* 入场 */
[data-rv],.prose>article,.hero-in{transition:opacity .28s ease,transform .28s ease}
.rv-on [data-rv]:not(.in),
.rv-on .prose>article:not(.in),
.rv-on .hero-in:not(.in){opacity:0;transform:translateY(18px)}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
}

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