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

/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-bg: #000000;
  --c-surface: #121212;
  --c-surface2: #1a1a1a;
  --c-border: #2a2a2a;
  --c-text: #e0e0e0;
  --c-text-muted: #888888;
  --c-accent: #4a9eff;
  --c-accent-green: #39ff7a;
  --c-accent-gold: #ffd066;
  --c-accent-purple: #c084fc;
  --c-neon-blue: #00bfff;
  --nav-h: 100px;
  --radius: 10px;
  --font: 'Noto Sans Thai', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-text);
}

body.oled-dark {
  font-family: var(--font);
  line-height: 1.7;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--c-neon-blue);
  text-shadow: 0 0 10px var(--c-neon-blue);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== scroll-margin for sections ===== */
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

/* ===== 顶部公告条 ===== */
.top-bar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  text-align: center;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--c-accent-gold);
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 200;
}

.top-bar__text {
  opacity: 0.9;
}

/* ===== 头部：品牌行 + 菜单行 ===== */
.site-header {
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 29px;
  z-index: 190;
  backdrop-filter: blur(8px);
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--c-border);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-text);
}

.brand-logo {
  height: 36px;
  width: auto;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 0 10px var(--c-accent);
}

/* 汉堡按钮 */
.hamburger {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger:hover .hamburger__bar {
  background: var(--c-accent);
  box-shadow: 0 0 6px var(--c-accent);
}

/* 菜单行（桌面可见） */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  min-height: 44px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  text-shadow: 0 0 8px var(--c-accent);
}

/* ===== 全屏遮罩菜单 ===== */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.fullscreen-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.fullscreen-menu__overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: none;
}

.fullscreen-menu__overlay.is-open {
  display: block;
}

.fullscreen-menu__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}

.fullscreen-menu__close:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 10px var(--c-accent);
}

.fullscreen-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 24px;
}

.fullscreen-menu__link {
  display: block;
  text-align: center;
  padding: 14px 32px;
  font-size: 20px;
  font-weight: 500;
  color: var(--c-text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  width: 100%;
  max-width: 360px;
  min-height: 52px;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s, background 0.2s;
}

.fullscreen-menu__link:hover {
  color: var(--c-accent-green);
  border-color: var(--c-accent-green);
  background: rgba(57, 255, 122, 0.06);
  text-shadow: 0 0 10px var(--c-accent-green);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(0, 63, 127, 0.18) 0%, transparent 70%),
    var(--c-bg);
  position: relative;
  overflow: hidden;
}

/* 点阵底纹 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(74, 158, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero__eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-accent-gold);
  text-transform: uppercase;
  border-left: 3px solid var(--c-accent-gold);
  padding-left: 12px;
}

.hero__h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 0 10px rgba(74, 158, 255, 0.4);
}

.hero__desc {
  font-size: 17px;
  color: var(--c-text-muted);
  line-height: 1.7;
  max-width: 480px;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  background: var(--c-accent);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  min-height: 48px;
  align-self: flex-start;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.hero__cta:hover {
  background: var(--c-neon-blue);
  box-shadow: 0 0 20px var(--c-neon-blue);
  transform: translateY(-2px);
  color: #000;
  text-shadow: none;
}

.hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__media-inner {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4/3;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
}

.dot-grid {
  background-image: radial-gradient(circle, rgba(74, 158, 255, 0.18) 1px, transparent 1px);
  background-size: 20px 20px;
}

.hero__media-card {
  border: 1px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 0 24px rgba(74, 158, 255, 0.15);
}

.hero__media-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px var(--c-accent);
}

/* ===== 正文主容器 ===== */
.site-main {
  padding: 60px 0 80px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.content-primary {
  min-width: 0;
}

.page-content {
  /* section 直接子 article */
}

.page-article {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
}

/* 正文内部的 section 标题 */
.page-article h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 48px 0 12px;
  padding-bottom: 8px;
}

.page-article h2 + hr,
.page-article h3 + hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 0 0 20px;
}

.page-article h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-accent);
  margin: 32px 0 10px;
}

.page-article p {
  margin-bottom: 16px;
  color: var(--c-text);
}

.page-article ul, .page-article ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.page-article li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.page-article a {
  color: var(--c-accent);
  border-bottom: 1px solid rgba(74, 158, 255, 0.3);
  padding-bottom: 1px;
}

.page-article a:hover {
  border-bottom-color: var(--c-neon-blue);
}

/* section 区块间距与分隔 */
.page-article section {
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--c-border);
}

.page-article section:last-child {
  border-bottom: none;
}

/* 卡片风格描边 */
.page-article .card,
.page-article [class*="card"] {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--c-surface);
  margin-bottom: 20px;
}

/* ===== 侧边栏 ===== */
.content-aside {
  position: sticky;
  top: 140px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aside-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-accent-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.content-aside hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 4px 0 8px;
}

.aside-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--c-text-muted);
  border-radius: 6px;
  border: 1px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.aside-link:hover {
  color: var(--c-accent-green);
  border-color: var(--c-accent-green);
  background: rgba(57, 255, 122, 0.06);
  text-shadow: 0 0 8px var(--c-accent-green);
}

.aside-tip {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-tip__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent-purple);
  letter-spacing: 0.04em;
}

.aside-tip__text {
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 48px 24px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* footer 内 nav > dl > dt/dd > a 结构 */
.site-footer nav {
  width: 100%;
  max-width: 700px;
}

.footer-dl {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  list-style: none;
}

.footer-dl dt {
  padding: 0 12px;
  border-right: 1px solid var(--c-border);
}

.footer-dl dt:last-child {
  border-right: none;
}

.footer-dl dt a {
  font-size: 14px;
  color: var(--c-text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-dl dt a:hover {
  color: var(--c-accent);
  text-shadow: 0 0 8px var(--c-accent);
}

.footer-brand-big {
  font-size: clamp(36px, 8vw, 80px);
  font-weight: 700;
  color: rgba(255,255,255,0.06);
  letter-spacing: 0.05em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.footer-desc {
  font-size: 14px;
  color: var(--c-text-muted);
  max-width: 480px;
  line-height: 1.6;
}

.footer-copy {
  font-size: 13px;
  color: var(--c-text-muted);
  border-top: 1px solid var(--c-border);
  padding-top: 16px;
  width: 100%;
  max-width: 700px;
}

.footer-small {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  max-width: 600px;
}

/* ===== 站点包装器 ===== */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero__media-inner {
    animation: float 6s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  .fullscreen-menu__link {
    transition: color 0.2s, border-color 0.2s, text-shadow 0.2s, background 0.2s, transform 0.15s;
  }

  .fullscreen-menu__link:hover {
    transform: scale(1.03);
  }

  .hero__cta {
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 86px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    padding: 60px 24px;
    gap: 36px;
    text-align: left;
  }

  .hero__media {
    display: none;
  }

  .hero__cta {
    align-self: flex-start;
  }

  .header-nav {
    display: none;
  }

  .header-brand {
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }

  .site-main {
    padding: 40px 0 60px;
  }

  .page-article h2 {
    font-size: 19px;
  }

  .footer-dl {
    flex-direction: column;
    align-items: center;
  }

  .footer-dl dt {
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding: 4px 0;
    width: 100%;
    text-align: center;
  }

  .footer-dl dt:last-child {
    border-bottom: none;
  }

  .fullscreen-menu__link {
    font-size: 18px;
  }
}

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