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

:root {
  --mint: #b4fde1;
  --mint-2: #8ff0cd;
  --sky: #add8e6;
  --sky-2: #d9eef6;
  --ink: #172620;
  --cream: #f2fbf6;
  --r-lg: 24px;
  --r-md: 18px;
  --line: 3px solid var(--ink);
  --clay: inset -3px -3px 10px rgba(23, 38, 32, 0.16), 6px 7px 0 rgba(23, 38, 32, 0.16);
  --clay-sm: inset -2px -2px 6px rgba(23, 38, 32, 0.14), 4px 4px 0 rgba(23, 38, 32, 0.16);
  --bounce: 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Noto Sans Thai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(62vw 62vw at 104% -12%, var(--sky) 0%, rgba(173, 216, 230, 0) 62%),
    radial-gradient(54vw 54vw at -14% 34%, var(--mint) 0%, rgba(180, 253, 225, 0) 58%),
    var(--cream);
}

img { max-width: 100%; }

/* ---------- 顶部 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #e2fff4, var(--mint));
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 6px 0 rgba(23, 38, 32, 0.1);
}

.brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--line);
  border-radius: 15px;
  background: linear-gradient(155deg, #ffffff, var(--sky));
  box-shadow: var(--clay-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  transition: transform var(--bounce), box-shadow var(--bounce);
}

.brand:hover { transform: translateY(-2px) rotate(-4deg); }
.brand:active { transform: translateY(1px); box-shadow: inset 2px 2px 6px rgba(23, 38, 32, 0.28); }
.brand img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }

.topnav { margin-left: auto; min-width: 0; }

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform var(--bounce), background var(--bounce);
}

.chip:hover { background: var(--sky-2); transform: translateY(-2px); }
.chip:active { transform: translateY(1px); background: var(--mint); }

.group { display: contents; }

.group__btn {
  display: none;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--mint);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--bounce), background var(--bounce);
}

.group__btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
}

.group__btn:hover { transform: translateY(-2px); background: var(--sky-2); }

.group__list {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- 主体 ---------- */
.stage { padding: 16px 14px 44px; }
.sheet { min-width: 0; }

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  min-height: 76vh;
  padding: 54px 22px;
  text-align: right;
  border: 4px solid var(--ink);
  border-radius: var(--r-lg);
  background: linear-gradient(158deg, #eafff7 0%, var(--mint) 46%, var(--sky) 100%);
  box-shadow: var(--clay);
}

.hero__ghost {
  position: absolute;
  right: -3vw;
  bottom: -9vw;
  font-size: clamp(150px, 40vw, 330px);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.06em;
  color: rgba(23, 38, 32, 0.1);
  pointer-events: none;
  user-select: none;
}

.hero__title {
  position: relative;
  margin: 0;
  font-size: clamp(34px, 7.4vw, 68px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__lead {
  position: relative;
  margin: 0;
  max-width: 36ch;
  font-size: 17px;
  line-height: 1.7;
  color: #24413a;
}

article section {
  margin-top: 20px;
  padding: 26px 20px;
  border: var(--line);
  border-radius: var(--r-lg);
  background: #ffffff;
  box-shadow: var(--clay);
  scroll-margin-top: 100px;
  overflow-wrap: break-word;
}

article section:nth-of-type(even) {
  background: linear-gradient(165deg, #ffffff 30%, var(--sky-2) 100%);
}

article section:nth-of-type(3n) {
  background: linear-gradient(165deg, #ffffff 30%, #d8fdec 100%);
}

article small {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

article h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 4.4vw, 34px);
  line-height: 1.28;
  letter-spacing: -0.015em;
}

article h3 {
  margin: 24px 0 8px;
  font-size: 20px;
  line-height: 1.4;
}

article p { margin: 0 0 14px; }
article p:last-child { margin-bottom: 0; }
article ul,
article ol { margin: 0 0 14px; padding-left: 1.25em; }
article li { margin: 0.35em 0; }
article a {
  color: #0c5947;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
article a:hover { background: var(--sky-2); }
article strong { font-weight: 700; }
article time { font-weight: 700; }
article blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 6px solid var(--mint-2);
  border-radius: 0 14px 14px 0;
  background: var(--cream);
}
article img { border-radius: var(--r-md); }

/* ---------- 侧栏 ---------- */
.rail {
  margin-top: 20px;
  padding: 16px;
  border: var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, #ffffff, var(--sky-2));
  box-shadow: var(--clay);
}

.rail__kicker {
  display: inline-block;
  padding: 1px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.rail__title {
  margin: 8px 0 12px;
  font-size: 22px;
  line-height: 1.3;
}

.rail__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.2;
  transition: background var(--bounce), transform var(--bounce);
}

.rail__list a:hover { background: var(--mint); transform: translateY(-2px); }
.rail__list a.is-active { background: var(--ink); color: var(--mint); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 44px;
  padding: 28px 16px 20px;
  border-top: 4px solid var(--ink);
  background: linear-gradient(180deg, var(--mint) 0%, #e4fbf2 46%, var(--sky) 100%);
}

.foot__grid { display: grid; gap: 18px; }

.foot__brand {
  margin: 0;
  font-size: clamp(42px, 11.5vw, 112px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-shadow: 4px 4px 0 rgba(255, 255, 255, 0.7);
}

.foot__dl { margin: 0; }

.foot__dl dt {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #0b5645;
}

.foot__dl dd { margin: 0; }

.foot__dl a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.foot__dl a:hover { text-decoration: underline; text-underline-offset: 3px; }

.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 2px dashed rgba(23, 38, 32, 0.35);
}

.foot__copy { margin: 0; font-size: 16px; font-weight: 500; }

.foot__mini {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot__mini a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.foot__mini a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .menu > li,
  .rail__list li {
    animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .menu > li:nth-child(1) { animation-delay: 0.02s; }
  .menu > li:nth-child(2) { animation-delay: 0.06s; }
  .menu > li:nth-child(3) { animation-delay: 0.1s; }
  .menu > li:nth-child(4) { animation-delay: 0.14s; }
  .menu > li:nth-child(5) { animation-delay: 0.18s; }
  .rail__list li:nth-child(1) { animation-delay: 0.05s; }
  .rail__list li:nth-child(2) { animation-delay: 0.09s; }
  .rail__list li:nth-child(3) { animation-delay: 0.13s; }
  .rail__list li:nth-child(4) { animation-delay: 0.17s; }
  .rail__list li:nth-child(5) { animation-delay: 0.21s; }
  .rail__list li:nth-child(6) { animation-delay: 0.25s; }
  .rail__list li:nth-child(7) { animation-delay: 0.29s; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 宽屏 ---------- */
@media (min-width: 760px) {
  .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; align-items: start; }
}

@media (min-width: 960px) {
  .top { padding: 12px 26px; gap: 16px; }

  .group {
    display: block;
    position: relative;
  }

  .group__btn { display: flex; }

  .group__list {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 60;
    flex-direction: column;
    gap: 8px;
    min-width: 196px;
    margin: 0;
    padding: 10px;
    border: var(--line);
    border-radius: var(--r-md);
    background: #effdf7;
    box-shadow: var(--clay);
  }

  .group__list li { display: block; }

  .group.is-open .group__list,
  .group:focus-within .group__list { display: flex; }

  .stage {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 26px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 26px 64px;
  }

  .rail {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 100px;
    margin-top: 0;
  }

  .rail__list { flex-direction: column; flex-wrap: nowrap; }

  .sheet {
    grid-column: 2;
    grid-row: 1;
  }

  .hero { min-height: calc(100vh - 128px); padding: 64px 40px; }
  article section { padding: 34px 36px; }

  .foot { padding: 40px 26px 24px; }
}

@media (hover: hover) and (min-width: 960px) {
  .group:hover .group__list { display: flex; }
}

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