/* =====================================================
   Custom properties
===================================================== */
:root {
  --color-navy: #2B6CB0;
  --color-navy-dark: #14276D;
  --color-accent: #fb1202;
  --color-heading: #1A202C;
  --color-body: #2D3748;
  --color-nav-text: #4A5568;
  --color-bg-light: #EDF2F7;
  --color-bg-offwhite: #F7FAFC;
  --color-white: #ffffff;
  --color-muted: #718096;
  --color-form-bg: #eef1f6;

  --gradient-about: linear-gradient(90deg, rgb(218, 240, 255) 41%, rgba(247, 250, 252, 0) 100%);
  --gradient-contact: linear-gradient(135deg, rgb(6, 147, 227) 2%, rgb(20, 39, 109) 100%);
  --hero-overlay: rgba(217, 238, 253, 0.7);

  /* Font is chosen by language, not by role: Thai text -> Prompt, English text -> Sarabun.
     See the :lang(th) / :lang(en) rules below. */
  --font-prompt: 'Prompt', sans-serif;
  --font-sarabun: 'Sarabun', sans-serif;

  --radius-pill: 999px;
  --radius-md: 12px;

  --container-width: 1140px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

/* =====================================================
   Reset / base
===================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-weight: 400;
  color: var(--color-body);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Language-based font selection: Thai text uses Prompt, English text uses Sarabun.
   :lang() follows the nearest lang attribute (inherited from <html lang="th"> by
   default), so English fragments must be wrapped with lang="en" in the markup. */
:lang(th) { font-family: var(--font-prompt); }
:lang(en) { font-family: var(--font-sarabun); }

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

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; }

h1, h2, h3 {
  color: var(--color-heading);
  line-height: 1.25;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

.kicker {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin: 0 0 var(--space-2);
}

.kicker--light { color: var(--color-bg-light); }

.section-title {
  font-size: 1.6rem;
  margin-bottom: var(--space-3);
}

.section-title--center { text-align: center; }

section { padding: var(--space-5) 0; }

/* =====================================================
   Buttons
===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
  padding: 0.85em 2em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.btn--accent {
  background-color: #32373c;
  border-color: var(--color-navy);
  color: #fff;
}

.btn--contact {
    background-color: #fb1202;
    border-color: var(--color-navy);
    color: #fff;
}

.btn--navy {
  background-color: #32373c;
  border-color: #8fc1ea;
  color: #fff;
}

/* =====================================================
   Header / Nav
===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-white);
  box-shadow: 0 1px 3px rgba(26, 32, 44, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }

.brand__name-en {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-heading);
}

.brand__name-th {
  font-size: 0.75rem;
  color: var(--color-nav-text);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-heading);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  box-shadow: 0 8px 12px rgba(26, 32, 44, 0.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.site-nav.is-open { max-height: 320px; }

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
}

.site-nav__link {
  display: block;
  padding: 0.75em var(--space-1);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--color-nav-text);
  border-radius: 6px;
}

.site-nav__link:hover { color: var(--color-navy); background: var(--color-bg-offwhite); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    background: transparent;
  }

  .site-nav__list {
    flex-direction: row;
    gap: var(--space-2);
    padding: 0;
  }
}

/* =====================================================
   Hero
===================================================== */
.hero {
  background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), var(--color-bg-offwhite);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  text-align: center;
}

.hero__heading {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

@media (min-width: 640px) {
  .hero__actions { flex-direction: row; justify-content: center; }
}

@media (min-width: 768px) {
  .hero__heading { font-size: 2.6rem; }
}

@media (min-width: 1024px) {
  .hero { padding-top: var(--space-5); padding-bottom: var(--space-5); }
  .hero__heading { font-size: 3.2rem; }
}

/* =====================================================
   Our Customers
===================================================== */
.customers { background: var(--color-white); }

.customers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  align-items: center;
}

.customers__grid img {
  width: 100%;
  aspect-ratio: 2 / 1;
  box-sizing: border-box;
  object-fit: contain;
  background: var(--color-bg-light);
  border: 2px solid #bacfe4;
  border-radius: var(--radius-md);
  padding: 5px 5px 5px 5px;
}

@media (min-width: 640px) {
  .customers__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .customers__grid { grid-template-columns: repeat(6, 1fr); }
}

/* =====================================================
   About Company
===================================================== */
.about {
  background: var(--gradient-about), var(--color-bg-offwhite);
}

.about__inner { max-width: 780px; }

.about__text {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.7;
}

/* =====================================================
   Products
===================================================== */
.products { background: var(--color-white); }

.products__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.products__item {
  margin: 0;
  text-align: center;
}

.products__item img {
  border-radius: var(--radius-md);
  width: 100%;
}

.products__item figcaption {
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
  color: var(--color-heading);
}

@media (min-width: 768px) {
  .products__grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   Services / Innovation
===================================================== */
.services { background: var(--color-navy); }

.services .section-title { color: var(--color-white); max-width: 760px; }

.services__list {
  list-style: none;
  counter-reset: services-counter;
  margin-top: var(--space-3);
  display: grid;
  gap: var(--space-2);
}

.services__list li {
  counter-increment: services-counter;
  position: relative;
  padding-left: 2.4rem;
  color: var(--color-bg-light);
}

.services__list li::before {
  content: counter(services-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .services__list { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   Contact
===================================================== */
.contact {
  background: var(--color-white);
}

.contact__inner {
  display: grid;
  gap: var(--space-4);
}

.contact__info .section-title {
  color: var(--color-heading);
}

.contact__address {
  color: var(--color-heading);
  margin-bottom: var(--space-3);
}

.contact__list {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.contact__list a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-heading);
  font-weight: 600;
}

.contact__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-form-bg);
}

.contact__icon svg { width: 18px; height: 18px; }

.contact__form-wrap {
  background: var(--color-form-bg);
  color: var(--color-muted);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.form-field { margin-bottom: var(--space-2); }

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--color-heading);
}

.form-field .required { color: var(--color-accent); margin-left: 0.2rem; }

.form-field input,
.form-field textarea {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.7em 0.9em;
  border: 1px solid #CBD5E0;
  border-radius: 8px;
  color: var(--color-body);
  background: var(--color-white);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-navy);
  background: var(--color-white);
}

.form-field textarea { resize: vertical; }

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: var(--color-accent);
}

.form-field__error {
  color: var(--color-accent);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.contact-form__note {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--color-nav-text);
  background: var(--color-bg-light);
  border-radius: 8px;
  padding: 0.7em 0.9em;
}

@media (min-width: 768px) {
  .contact__inner { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* =====================================================
   Footer menu (sits between main content and the footer bar)
===================================================== */
.footer-menu {
  background: #eef1f6;
}

.footer-menu__inner {
  padding: var(--space-3) var(--space-2);
  overflow-x: auto;
}

.footer-menu__list {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  min-width: max-content;
  margin: 0 auto;
}

.footer-menu__link {
  display: inline-block;
  padding: 0.25em 0;
  font-weight: 500;
  font-size: 17px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-nav-text);
}

.footer-menu__link:hover { color: var(--color-navy); }

@media (min-width: 640px) {
  .footer-menu__list { gap: var(--space-5); }
}

/* =====================================================
   Footer
===================================================== */
.site-footer {
  background: var(--color-navy);
  padding: var(--space-4) 0;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.site-footer__logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.site-footer__text p {
  color: var(--color-white);
  font-size: 0.85rem;
  margin: 0.2em 0;
}

@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; text-align: left; }
}
