@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@500;600;700&family=Sarabun:wght@400;500;700&display=swap');

:root {
  --bg: #0B2A5B;
  --bg-deep: #081D40;
  --silver: #C0C7D1;
  --blue: #3D8BFF;
  --text: #F5F8FC;
  --keyword: #9CC4FF;
  --silver-line: rgba(192, 199, 209, 0.35);
  --silver-soft: rgba(192, 199, 209, 0.12);
  --blue-glow: rgba(61, 139, 255, 0.35);
  --blue-soft: rgba(61, 139, 255, 0.14);
  --card-bg: rgba(8, 29, 64, 0.65);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(4, 14, 33, 0.45);
  --font-head: 'Kanit', sans-serif;
  --font-body: 'Sarabun', sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 85% 8%, var(--blue-glow), transparent 38%),
    radial-gradient(circle at 10% 55%, var(--blue-soft), transparent 40%),
    repeating-linear-gradient(60deg, transparent 0 46px, rgba(192, 199, 209, 0.04) 46px 47px),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--keyword); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--blue); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; color: var(--silver); }
p { margin: 0 0 1em; }
strong, b { color: var(--keyword); }

.shell {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 1rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(8, 29, 64, 0.96), rgba(11, 42, 91, 0.92));
  border-bottom: 1px solid var(--silver-line);
  box-shadow: 0 4px 24px rgba(4, 14, 33, 0.5);
  backdrop-filter: blur(8px);
}
.site-header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--silver), var(--blue), var(--silver), transparent);
  opacity: .7;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: .8rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: .5px;
}
.brand:hover { color: var(--keyword); }
.brand__logo {
  height: 2.6rem;
  width: auto;
  filter: drop-shadow(0 0 8px var(--blue-glow));
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-toggle-btn { display: none; }

.nav__list {
  display: flex;
  align-items: center;
  gap: .4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: block;
  padding: .5rem .9rem;
  color: var(--silver);
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .2s ease;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--text);
  border-color: var(--silver-line);
  background: var(--silver-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.7rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: box-shadow .25s ease, transform .2s ease, background .2s ease, color .2s ease;
}
.btn--primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 700;
}
.btn--primary:hover {
  color: #fff;
  background: #5a9cff;
  box-shadow: 0 0 22px var(--blue-glow), 0 0 4px var(--blue);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--silver);
  border-color: var(--silver);
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--silver-soft);
  border-color: var(--text);
}
.header-cta { padding: .55rem 1.3rem; font-size: .95rem; }

/* Layout enforcement */
.hero, .page-hero, .section { padding-inline: 1rem; }
.hero > *, .page-hero > *, .section > * {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(61, 139, 255, 0.35), transparent 50%),
    radial-gradient(ellipse at 15% 85%, rgba(192, 199, 209, 0.14), transparent 45%),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
  border-bottom: 1px solid var(--silver-line);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 63px, rgba(192, 199, 209, 0.06) 63px 64px),
    repeating-linear-gradient(90deg, transparent 0 63px, rgba(192, 199, 209, 0.06) 63px 64px);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .brand__logo, .hero img { margin-inline: auto; }

.page-hero {
  padding-block: 3.5rem 2.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(61, 139, 255, 0.28), transparent 60%),
    linear-gradient(180deg, var(--bg), transparent);
  border-bottom: 1px solid var(--silver-line);
}

.eyebrow {
  display: block;
  width: max-content;
  max-width: calc(100% - 2rem);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
  position: static;
  float: none;
  left: auto;
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--keyword);
  border: 1px solid var(--silver-line);
  background: var(--blue-soft);
}

.lede {
  font-size: 1.2rem;
  color: var(--silver);
  max-width: 46rem;
  margin-inline: auto;
}
.hero > .lede, .page-hero > .lede { width: min(46rem, 100%); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
}

.section { padding-block: 3.5rem; }
.section > * + * { margin-top: 1.5rem; }
.section > h2 {
  position: relative;
  padding-bottom: .8rem;
}
.section > h2::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin-top: .7rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--silver));
}

.feature-row, .contact-grid, .split { display: grid; }
.feature-row { grid-template-columns: repeat(3, 1fr); }
.contact-grid { grid-template-columns: repeat(2, 1fr); }
.split { grid-template-columns: 1fr 1fr; align-items: center; }
.feature-row, .contact-grid, .split { gap: 1.5rem; }

.card, .feature {
  background: var(--card-bg);
  border: 1px solid var(--silver-line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  position: relative;
}
.card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover {
  transform: translateY(-4px);
  border-color: var(--silver);
  box-shadow: var(--shadow), 0 0 24px var(--blue-soft);
}
.feature {
  background: linear-gradient(160deg, rgba(61, 139, 255, 0.14), rgba(8, 29, 64, 0.7));
  border-top: 3px solid var(--silver);
}
.feature h3, .card h3 { margin-bottom: .5em; }
.feature p:last-child, .card p:last-child { margin-bottom: 0; }

.cta-panel {
  text-align: center;
  padding: 2.6rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--silver);
  background:
    radial-gradient(circle at 50% 0%, rgba(61, 139, 255, 0.35), transparent 65%),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
  box-shadow: var(--shadow), 0 0 30px var(--blue-soft);
}
.cta-panel .hero__actions { margin-top: 1.4rem; }

.prose { max-width: 800px; }
.section > .prose { margin-inline: auto; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote {
  margin: 1.2em 0;
  padding: .8rem 1.2rem;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 0 12px 12px 0;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, var(--bg), var(--bg-deep));
  border-top: 1px solid var(--silver-line);
  color: var(--text);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  padding-block: 2.8rem 2rem;
}
.site-footer__brand { max-width: 30rem; }
.site-footer__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  margin: 0 0 .4rem;
}
.site-footer__tagline { color: var(--silver); margin: 0; }
.site-footer__heading {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--silver);
  margin: 0 0 .8rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--silver-line);
}
.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.site-footer__links a { color: var(--text); }
.site-footer__links a:hover { color: var(--blue); }
.site-footer__bar {
  border-top: 1px solid var(--silver-line);
  padding: 1rem;
  text-align: center;
  font-size: .9rem;
  color: var(--silver);
  background: rgba(4, 14, 33, 0.4);
}

@media (max-width: 900px) {
  .nav-toggle-btn {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    border: 1px solid currentColor;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: var(--silver);
  }
  .nav-toggle-btn::before {
    content: '';
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
  }
  .nav { display: none; width: 100%; }
  .nav-toggle:checked ~ .nav { display: block; }
  .nav-toggle:checked ~ .nav .nav__list {
    flex-direction: column;
    align-items: stretch;
  }
  .feature-row, .contact-grid, .split, .site-footer__grid {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; padding-block: 3rem; }
  .header-cta { width: 100%; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero__actions .btn { width: 100%; }
  .eyebrow { white-space: normal; }
}

/* image-gallery: generated in code */
section.image-gallery .image-gallery__grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 1rem;
  width: 100%;
}
section.image-gallery figure.image-gallery__item {
  box-sizing: border-box;
  display: block !important;
  flex: 0 1 calc((100% - 2rem) / 3) !important;
  width: calc((100% - 2rem) / 3) !important;
  max-width: calc((100% - 2rem) / 3) !important;
  margin: 0 !important;
}
section.image-gallery .image-gallery__grid--count-1 figure.image-gallery__item {
  flex-basis: min(360px, 100%) !important;
  width: min(360px, 100%) !important;
  max-width: min(360px, 100%) !important;
}
section.image-gallery .image-gallery__grid--count-2 figure.image-gallery__item {
  flex-basis: min(360px, calc((100% - 1rem) / 2)) !important;
  width: min(360px, calc((100% - 1rem) / 2)) !important;
  max-width: min(360px, calc((100% - 1rem) / 2)) !important;
}
section.image-gallery .image-gallery__item img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover;
}
@media (max-width: 720px) {
  section.image-gallery figure.image-gallery__item,
  section.image-gallery .image-gallery__grid--count-1 figure.image-gallery__item,
  section.image-gallery .image-gallery__grid--count-2 figure.image-gallery__item {
    flex-basis: calc((100% - 1rem) / 2) !important;
    width: calc((100% - 1rem) / 2) !important;
    max-width: calc((100% - 1rem) / 2) !important;
  }
}
@media (max-width: 480px) {
  section.image-gallery figure.image-gallery__item,
  section.image-gallery .image-gallery__grid--count-1 figure.image-gallery__item,
  section.image-gallery .image-gallery__grid--count-2 figure.image-gallery__item {
    flex-basis: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* slot-media: homepage images assigned in code */
.slot-media {
  margin: 1rem 0;
  width: 100%;
}
.slot-media__grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 0.75rem;
  width: 100%;
}
.hero--stack .slot-media__grid,
.hero--center .slot-media__grid,
.hero .slot-media__grid--count-1 {
  justify-content: center !important;
}
.slot-media figure.slot-media__item {
  box-sizing: border-box;
  display: block !important;
  flex: 0 1 calc((100% - 1.5rem) / 3) !important;
  width: calc((100% - 1.5rem) / 3) !important;
  max-width: calc((100% - 1.5rem) / 3) !important;
  margin: 0 !important;
}
.slot-media .slot-media__grid--count-1 figure.slot-media__item {
  flex-basis: min(520px, 100%) !important;
  width: min(520px, 100%) !important;
  max-width: min(520px, 100%) !important;
}
.slot-media .slot-media__grid--count-2 figure.slot-media__item,
.slot-media .slot-media__grid--count-many figure.slot-media__item {
  flex-basis: min(360px, calc((100% - 0.75rem) / 2)) !important;
  width: min(360px, calc((100% - 0.75rem) / 2)) !important;
  max-width: min(360px, calc((100% - 0.75rem) / 2)) !important;
}
.shell.split .slot-media figure.slot-media__item {
  flex-basis: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}
.shell.split .slot-media .slot-media__grid--count-2 figure.slot-media__item,
.shell.split .slot-media .slot-media__grid--count-many figure.slot-media__item {
  flex-basis: calc((100% - 0.75rem) / 2) !important;
  width: calc((100% - 0.75rem) / 2) !important;
  max-width: calc((100% - 0.75rem) / 2) !important;
}
.slot-media .slot-media__item img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: cover;
  border-radius: 0.75rem;
}
.hero--center > .slot-media--banner,
.hero--stack > .slot-media--banner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto 1rem;
  padding: 0 1rem;
  box-sizing: border-box;
}
.hero--center > .slot-media--banner .slot-media__grid,
.hero--stack > .slot-media--banner .slot-media__grid {
  justify-content: center !important;
}
.hero--center > .slot-media--banner figure.slot-media__item,
.hero--center > .slot-media--banner .slot-media__grid--count-1 figure.slot-media__item,
.hero--stack > .slot-media--banner figure.slot-media__item,
.hero--stack > .slot-media--banner .slot-media__grid--count-1 figure.slot-media__item {
  flex: 0 1 100% !important;
  flex-basis: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}
.hero--center > .slot-media--banner .slot-media__item img,
.hero--stack > .slot-media--banner .slot-media__item img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 0.75rem;
}
@media (max-width: 720px) {
  .hero--center > .slot-media--banner,
  .hero--stack > .slot-media--banner {
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
  }
}

/* middle count-1: full width, height capped — not hero, not split */
.section > .shell:not(.split) .slot-media .slot-media__grid--count-1 figure.slot-media__item {
  flex: 0 1 100% !important;
  flex-basis: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

.section > .shell:not(.split) .slot-media .slot-media__grid--count-1 .slot-media__item img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 28rem !important;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

@media (max-width: 720px) {
  .section > .shell:not(.split) .slot-media .slot-media__grid--count-1 .slot-media__item img {
    max-height: 20rem !important;
  }
}

/* typography rhythm: generated in code */
.section .shell:not(.cta-panel) > h2 { margin-bottom: 1rem; }
.section .shell:not(.cta-panel) > * + * { margin-top: 1.25rem; }
.section .shell:not(.cta-panel) > h2 + * { margin-top: 0; }
.prose > * + * { margin-top: 1rem; }
.prose > h2, .prose > h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose > h2 + *, .prose > h3 + * { margin-top: 0; }

/* hero-img: spacing between hero image and following text */
.hero .shell > img, .page-hero .shell > img {
  margin: 0 auto 1.75rem;
  border-radius: 0.75rem;
}
