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

:root {
  --blue: #1F3A93;
  --yellow: #FFC145;
  --paper: #F4F6F8;
  --ink: #101B38;
  --muted: #55617d;
  --radius: 18px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.28; font-weight: 700; color: var(--blue); }
p { margin: 0 0 14px; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--yellow);
  border-bottom: 4px solid var(--blue);
}

.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.nav-a, .nav-b { min-width: 0; }

.nav-a p,
.nav-b p {
  margin: 0;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.nav-a p::-webkit-scrollbar,
.nav-b p::-webkit-scrollbar { display: none; }

.nav-b p { justify-content: flex-end; }

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.top nav a:hover,
.top nav a:focus-visible {
  background: var(--blue);
  color: var(--yellow);
}

.top nav a.cta {
  margin-left: 6px;
  background: var(--blue);
  color: var(--yellow);
  font-weight: 700;
}

.top nav a.cta:hover { background: var(--ink); }

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--blue);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo { width: 34px; height: 34px; border-radius: 4px; }

.grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 16px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  column-gap: 34px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
  min-height: 100vh;
  margin: 0 0 28px;
  background: var(--blue);
  color: var(--paper);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

.hero-fig {
  position: relative;
  margin: 0;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  overflow: hidden;
}

.hero-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-num {
  position: absolute;
  z-index: 1;
  left: -3%;
  bottom: -6%;
  font-size: clamp(150px, 28vw, 380px);
  line-height: .78;
  font-weight: 700;
  letter-spacing: -.04em;
  color: rgba(31, 58, 147, .35);
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 46px 28px;
}

.hero h1 {
  margin: 0 0 16px;
  color: var(--yellow);
  font-size: clamp(29px, 4.4vw, 54px);
  letter-spacing: -.01em;
}

.hero .subtitle {
  margin: 0 auto;
  max-width: 32ch;
  color: var(--paper);
  font-size: 17px;
  font-weight: 400;
}

.hero-jump {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.hero-jump:hover { background: var(--paper); }

.grid > article:not(.hero) {
  grid-column: 1;
  margin: 0 0 22px;
  padding: 26px 24px;
  background: #ffffff;
  border-radius: var(--radius);
  border-bottom: 8px solid var(--yellow);
  scroll-margin-top: 96px;
  animation: rise .45s ease both;
}

.grid > article:not(.hero):nth-child(2) { animation-delay: .03s; }
.grid > article:not(.hero):nth-child(3) { animation-delay: .06s; }
.grid > article:not(.hero):nth-child(4) { animation-delay: .09s; }
.grid > article:not(.hero):nth-child(5) { animation-delay: .12s; }
.grid > article:not(.hero):nth-child(6) { animation-delay: .15s; }
.grid > article:not(.hero):nth-child(7) { animation-delay: .18s; }
.grid > article:not(.hero):nth-child(8) { animation-delay: .21s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.grid > article:not(.hero) h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 30px);
}

.grid > article:not(.hero) h3 {
  margin: 22px 0 8px;
  font-size: 19px;
}

.grid > article:not(.hero) p { color: #22304f; }

.grid > article:not(.hero) a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.grid > article:not(.hero) a:hover { background: var(--yellow); }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 0 0 8px; }

blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--paper);
  border-left: 8px solid var(--yellow);
  border-radius: 0 4px 4px 0;
}

figure { margin: 0 0 16px; }
figcaption { padding-top: 6px; font-size: 16px; color: var(--muted); }

.rail {
  grid-column: 2;
  grid-row: 2 / span 8;
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 20px 18px;
  background: var(--blue);
  color: var(--paper);
  border-radius: var(--radius);
  border-bottom: 8px solid var(--yellow);
}

.rail-title { margin: 0 0 4px; font-size: 18px; color: var(--yellow); }
.rail .subtitle { margin: 0 0 14px; font-size: 16px; color: #b9c6e6; }

.rail-list { list-style: none; margin: 0 0 16px; padding: 0; }
.rail-list li { margin: 0; }

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 246, 248, .22);
  transition: color .16s ease, padding-left .16s ease;
}

.rail-list a:hover { color: var(--yellow); padding-left: 5px; }

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .16s ease;
}

.rail-top:hover { background: var(--paper); }

.foot {
  margin-top: 16px;
  padding: 36px 16px 22px;
  background: var(--ink);
  color: var(--paper);
  border-top: 8px solid var(--yellow);
}

.foot-brand {
  max-width: 1180px;
  margin: 0 auto 22px;
  font-size: clamp(38px, 8.6vw, 88px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--yellow);
  word-break: break-word;
}

.foot-cols {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
  border-top: 2px solid rgba(255, 193, 69, .35);
}

.foot-cols dl { margin: 0; }
.foot-cols dt { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--yellow); }
.foot-cols dd { margin: 0; font-size: 16px; color: #c6d0e6; }

.foot-cols dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
}

.foot-cols dd a:hover { color: var(--yellow); }

.foot-bar {
  max-width: 1180px;
  margin: 22px auto 0;
  padding-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 2px solid rgba(255, 193, 69, .35);
}

.foot-bar p { margin: 0; font-size: 16px; color: #c6d0e6; }

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}

.foot-bar a:hover { color: var(--paper); }

@media (max-width: 880px) {
  .top-inner {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 12px;
  }

  .brand { grid-column: 1; justify-self: center; }
  .nav-b p { justify-content: flex-start; }

  .grid {
    grid-template-columns: 1fr;
    padding: 20px 12px 36px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: var(--radius);
  }

  .hero-fig { min-height: 38vh; max-height: 52vh; }
  .hero-copy { padding: 30px 18px 34px; }
  .hero-num { font-size: clamp(120px, 42vw, 260px); bottom: -4%; }

  .grid > article:not(.hero) { padding: 20px 16px; }

  .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-top: 6px;
  }

  .foot-cols { grid-template-columns: 1fr; gap: 6px; }
}

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