@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;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Thai', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #000;
  background: #fff;
  overflow-x: hidden;
}

a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover, a:focus {
  opacity: 0.65;
  outline: 2px solid #000;
  outline-offset: 2px;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* ===== 公告条 ===== */
.announce-bar {
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem;
  font-weight: 500;
}

/* ===== 站头 ===== */
.site-header {
  background: #fff;
  border-bottom: 2px solid #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  min-height: 44px;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #000;
  white-space: nowrap;
}

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

/* 导航：nav > ol > li > a */
#main-nav {
  flex: 1;
}

#main-nav > ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

#main-nav > ol > li > a {
  display: block;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: #000;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

#main-nav > ol > li > a:hover,
#main-nav > ol > li > a:focus {
  border-bottom-color: #000;
  opacity: 1;
  outline: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #000;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
}

/* ===== 粘性锚点条 ===== */
.sticky-anchor-bar {
  background: #f4f4f4;
  border-bottom: 1px solid #000;
  overflow-x: auto;
  position: sticky;
  top: calc(60px + 30px);
  z-index: 90;
}

.sticky-anchor-bar > ol {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0;
  white-space: nowrap;
}

.sticky-anchor-bar > ol > li > a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  text-decoration: none;
  color: #000;
  letter-spacing: 0.02em;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sticky-anchor-bar > ol > li > a:hover {
  background: #000;
  color: #fff;
  opacity: 1;
  outline: none;
}

/* ===== Hero（首页） ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 2px solid #000;
  overflow: hidden;
}

.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#000 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.06;
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero-text {
  max-width: 680px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border-left: 4px solid #000;
  padding-left: 0.75rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

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

.deco-num {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #000;
  opacity: 0.06;
  line-height: 1;
  user-select: none;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: 2px solid #000;
  min-height: 48px;
  transition: background 0.15s, color 0.15s;
}

.btn-primary:hover, .btn-primary:focus {
  background: #fff;
  color: #000;
  opacity: 1;
  outline: 2px solid #000;
}

/* ===== 通用页面 Hero（非首页） ===== */
.page-hero-slim {
  border-bottom: 2px solid #000;
  background: #000;
  color: #fff;
  padding: 4rem 0 3rem;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-hero-slim h1 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.page-hero-slim p {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
}

.page-hero-slim time {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* 关于页 Hero */
.about-hero {
  border-bottom: 2px solid #000;
  background: #fff;
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.about-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.about-hero h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.about-hero-deco {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.deco-large {
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #000;
  opacity: 0.05;
  line-height: 1;
}

/* ===== 主容器与布局 ===== */
main {
  padding: 4rem 0;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 含侧边栏布局：aside 在内容左侧 */
.layout-with-aside {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

/* 侧边栏 */
.sidebar {
  border: 2px solid #000;
  border-radius: 18px;
  padding: 1.5rem;
  position: sticky;
  top: calc(60px + 44px + 2rem);
}

.sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-links li a {
  display: block;
  padding: 0.5rem 0.25rem;
  font-size: 0.88rem;
  text-decoration: none;
  color: #000;
  border-bottom: 1px solid #e0e0e0;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar-links li a:hover {
  padding-left: 0.5rem;
  opacity: 1;
  outline: none;
}

.sidebar-block {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.sidebar-block p {
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.sidebar-block a {
  font-size: 0.88rem;
}

.sidebar-brand-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ===== eyebrow 小标题 ===== */
.eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #555;
}

/* ===== 正文 ===== */
.prose {
  min-width: 0;
}

.prose-body {
  font-size: 1rem;
  line-height: 1.8;
  color: #111;
}

.prose-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

.prose-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.prose-body p {
  margin-bottom: 1.25rem;
}

.prose-body ul, .prose-body ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose-body ol {
  list-style: decimal;
}

.prose-body li {
  margin-bottom: 0.4rem;
}

.prose-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose-body blockquote {
  border-left: 4px solid #000;
  padding: 0.75rem 1.25rem;
  background: #f7f7f7;
  margin: 1.5rem 0;
  font-style: italic;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: #000;
  color: #fff;
  padding: 0.2rem 0.6rem;
}

.article-date {
  font-size: 0.82rem;
  color: #666;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}

/* ===== 首页：卡片网格 ===== */
.home-content-section {
  margin-bottom: 4rem;
}

.index-section {
  margin-top: 0;
}

.index-section > h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* 卡片：描边无阴影，圆角18px，子页并列 a > strong */
.card {
  display: block;
  border: 2px solid #000;
  border-radius: 18px;
  padding: 1.5rem;
  text-decoration: none;
  color: #000;
  transition: background 0.15s;
  position: relative;
}

.card:hover, .card:focus {
  background: #000;
  color: #fff;
  opacity: 1;
  outline: 2px solid #000;
  outline-offset: 2px;
}

.card:hover span, .card:focus span {
  color: rgba(255,255,255,0.75);
}

.card > strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card > span {
  display: block;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

.card > time {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.75rem;
}

/* 首页侧边栏放在 card-grid 右侧（home layout 专属） */
.home-content-section + .index-section {
  grid-column: 1;
}

/* 首页布局覆盖：main > div.wrap > article > section */
main > .wrap > .home-content-section {
  grid-column: 1;
}

/* ===== 服务页 ===== */
.service-content {
  min-width: 0;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ===== cases 页 ===== */
.cases-content {
  min-width: 0;
}

.cases-hero {
  background: #000;
  color: #fff;
}

.cases-grid {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #000;
}

.cases-grid h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.case-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 2px solid #000;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: #000;
  margin-bottom: 0.75rem;
  transition: background 0.15s;
}

.case-card:hover, .case-card:focus {
  background: #000;
  color: #fff;
  opacity: 1;
  outline: 2px solid #000;
  outline-offset: 2px;
}

.case-card:hover .case-num, .case-card:focus .case-num {
  color: rgba(255,255,255,0.3);
}

.case-card > strong {
  font-size: 1rem;
  font-weight: 700;
  display: block;
  flex: 1;
}

.case-card > span {
  font-size: 0.85rem;
  color: #555;
  display: block;
  flex: 2;
}

.case-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ddd;
  flex-shrink: 0;
  letter-spacing: -0.03em;
}

/* ===== FAQ 页 ===== */
.faq-content {
  min-width: 0;
}

.faq-body details {
  border: 2px solid #000;
  border-radius: 18px;
  margin-bottom: 0.75rem;
  padding: 0;
  overflow: hidden;
}

.faq-body details summary {
  padding: 1.1rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.faq-body details summary::-webkit-details-marker { display: none; }

.faq-body details[open] summary {
  border-bottom: 2px solid #000;
}

.faq-body details > div,
.faq-body details > p {
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ===== 联系页表单 ===== */
.contact-content {
  min-width: 0;
}

.contact-form-wrap {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #000;
}

.contact-form-wrap h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 560px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  border: 2px solid #000;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #000;
  width: 100%;
  min-height: 44px;
  transition: outline 0.1s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== 相关导航区块 ===== */
.related-nav {
  background: #f4f4f4;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
  padding: 3rem 0;
}

.related-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.related-inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

/* ===== 页脚：footer 仅含 p + small ===== */
footer {
  background: #000;
  color: #fff;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

footer p {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer a:hover {
  opacity: 0.7;
  outline-color: #fff;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.footer-brand-sm {
  font-size: 1rem;
  font-weight: 700;
}

.footer-copy {
  margin-top: 1rem;
  opacity: 0.7;
}

footer > small {
  display: block;
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 0.5rem;
}

.footer-disclaimer {
  opacity: 0.55;
}

.footer-disclaimer a {
  color: #fff;
}

/* 首页三栏页脚 grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto 2rem;
  text-align: left;
}

.footer-col p {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.footer-col a {
  font-size: 0.85rem;
  display: block;
}

.footer-col strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.footer-contact {
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 1.5rem;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .card,
  .case-card,
  .sidebar,
  .hero-text h1 {
    transition: transform 0.25s ease, background 0.15s ease, color 0.15s ease;
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

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

  .sidebar {
    position: static;
    order: -1;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-contact {
    border-left: none;
    padding-left: 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 4rem 1.5rem;
  }

  .hero-deco {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header .header-inner {
    flex-wrap: wrap;
    padding: 0 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  #main-nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 2px solid #000;
  }

  #main-nav.open {
    max-height: 600px;
  }

  #main-nav > ol {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  #main-nav > ol > li > a {
    padding: 0.75rem 1rem;
    min-height: 48px;
    border-bottom: 1px solid #e0e0e0;
  }

  .sticky-anchor-bar {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-row {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 3rem 1rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .page-hero-slim {
    padding: 2.5rem 0 2rem;
  }

  main {
    padding: 2rem 0;
  }

  .wrap {
    padding: 0 1rem;
  }

  .case-card {
    flex-direction: column;
  }

  .about-hero-deco {
    display: none;
  }
}

/* ===== 主容器结构契约支持 main > div.wrap > article > section ===== */
/* 确保每个 layout 的主容器结构可通过选择器检测 */
main > .wrap > article > section {
  display: block;
}

/* ===== 打印 ===== */
@media print {
  .site-header,
  .sticky-anchor-bar,
  .sidebar,
  .related-nav,
  footer {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    text-decoration: underline;
    color: #000;
  }
}
