:root {
  --primary: #0057d6;
  --teal: #14b8a6;
  --mint: #2dd4a8;
  --navy: #0b0b63;
  --navy-2: #12127a;
  --ink: #1e1e1e;
  --body-text: #5b6472;
  --radius: 24px;
  --radius-lg: 40px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  color: var(--body-text);
  line-height: 1.6;
  background: #fff;
}

html[lang="th"] body {
  font-family: 'Noto Sans Thai', 'Outfit', sans-serif;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; margin: 0 0 16px; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; margin-bottom: 8px; }
p { margin: 0 0 16px; }

a { color: var(--primary); text-decoration: none; }

/* ACCESSIBILITY */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
.section-dark a:focus-visible,
.section-dark button:focus-visible,
.hero a:focus-visible,
.hero button:focus-visible {
  outline-color: var(--mint);
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .03em;
  font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--teal));
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,184,166,.35); }

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: #fff; background: rgba(255,255,255,.08); }

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 1rem;
}
.btn-link:hover { text-decoration: underline; }

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 99, .85);
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.logo-img { height: 34px; width: auto; }
.logo-dark { display: none; }
.logo-text {
  font-family: "Arial Rounded MT Bold", "Arial Rounded MT", Arial, sans-serif;
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0;
  white-space: nowrap;
  color: #fff;
}
.logo-text-dark { display: none; color: var(--navy); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #fff;
  font-weight: 500;
  font-size: .95rem;
}
.main-nav a:hover { color: var(--mint); }
.nav-cta {
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 8px 20px;
}
.nav-cta:hover { border-color: var(--mint); }
.language-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}
.main-nav .language-switcher a {
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.main-nav .language-switcher a[aria-current="page"] {
  border-color: currentColor;
  color: var(--mint) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #1447e6 0%, var(--navy-2) 42%, var(--navy) 100%);
  padding: 72px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.hero-content { color: #fff; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-tagline {
  color: #d7dee8;
  font-size: 1.1rem;
  margin-bottom: 32px;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-motto {
  margin-top: 32px;
  font-size: 1rem;
  color: #b9c4d4;
}
.hero-motto strong { color: #fff; }
.hero-media img {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  width: 100%;
  object-fit: cover;
}

/* TRUST STRIP */
.trust-strip {
  background: #f7f8fa;
  border-bottom: 1px solid #eceef2;
  padding: 20px 0;
}
.trust-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
}
.trust-item {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .01em;
}
.trust-item::before {
  content: "✓";
  color: var(--teal);
  margin-right: 8px;
  font-weight: 700;
}

/* SECTIONS */
.section { padding: 90px 0; }
.section-alt { background: #f7f8fa; }
.section-dark {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #c9d0e6;
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark a:not(.btn) { color: var(--mint); }

.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 8px; }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--body-text);
  margin: 0;
}
.section-head.light .section-subtitle { color: #b9c4d4; }

/* CAPABILITIES */
.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 20px;
  box-shadow: 0 4px 24px rgba(11,11,99,.06);
  text-align: left;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: 0 12px 32px rgba(11,11,99,.12); transform: translateY(-4px); }
.card.clickable { cursor: pointer; }
.card h3 { font-size: 1.1rem; }

.workflow-banner {
  display: block;
  margin: 48px 0 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(11,11,99,.15);
}
.workflow-banner img { width: 100%; }
.workflow-caption {
  text-align: center;
  font-size: .95rem;
  color: var(--body-text);
  margin: 0;
}

/* ARTS BOX */
.arts-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.arts-text p { color: #c9d0e6; }
.arts-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}
.arts-features li {
  background: rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: .95rem;
  color: #fff;
}
.arts-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: clamp(18px, 2vw, 32px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  cursor: zoom-in;
}
.arts-image-button img {
  border-radius: inherit;
  box-shadow: none;
  transition: transform .2s ease;
}
.arts-image-button:hover img { transform: scale(1.02); }
.arts-media-pair {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: 16px;
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}
.arts-media-pair .arts-image-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.arts-media-pair .arts-image-button:nth-child(1) {
  grid-column: 1 / 5;
  grid-row: 1;
  height: auto;
  aspect-ratio: 3 / 4;
}
.arts-media-pair .arts-image-button:nth-child(2) {
  grid-column: 1 / 3;
  grid-row: 2;
  height: auto;
  aspect-ratio: 4 / 3;
}
.arts-media-pair .arts-image-button:nth-child(3) {
  grid-column: 3;
  grid-row: 2;
  height: auto;
  aspect-ratio: 5 / 8;
}
.arts-media-pair .arts-image-button:nth-child(4) {
  grid-column: 4;
  grid-row: 2;
  height: auto;
  aspect-ratio: 5 / 8;
}
.arts-media-pair .arts-image-button:nth-child(n+3) { border-radius: 18px; }

/* SELECTED PROJECTS */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.project-card {
  --project-card-radius: clamp(36px, 3.5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  background: #fff;
  border-radius: var(--project-card-radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(11,11,99,.06);
}
.project-content { padding: 36px; }
.project-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 24px;
  border-radius: var(--project-card-radius);
  background: #fff;
}
.project-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 8px;
}
.project-card h3 { margin-bottom: 20px; }
.project-external-link { margin: 20px 0 0; }
.project-external-link a { text-decoration: underline; text-underline-offset: 3px; }
.project-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  border-radius: var(--project-card-radius);
  clip-path: inset(0 round var(--project-card-radius));
  overflow: hidden;
  margin: 0;
}
.project-facts { margin: 0; }
.project-facts div { margin-bottom: 18px; }
.project-facts div:last-child { margin-bottom: 0; }
.project-facts dt {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.project-facts dd { margin: 0; }

/* ABOUT */
.about-text { max-width: 760px; margin-bottom: 32px; }
.team-banner {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 56px;
}

.location-block { margin-bottom: 56px; }
.location-block h3 { margin-bottom: 24px; }
.location-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.location-item p { margin: 0; font-size: .95rem; }

.name-origin {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  background: #f7f8fa;
  border-radius: var(--radius);
  padding: 28px;
}
.name-origin-icon { margin-top: 4px; }
.name-origin-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 8px;
}
.name-origin-text { margin: 0; color: var(--body-text); }

/* CERTIFICATIONS */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.cert-item {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(11,11,99,.06);
}
.cert-item img { max-height: 80px; width: auto; margin: 0 auto 20px; }
.cert-item p { margin: 0; }
.cert-note {
  margin: 24px 0 0;
  font-size: .8rem;
  color: #999;
  font-style: italic;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-details {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.contact-details li { margin-bottom: 10px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #f7f8fa;
  padding: 32px;
  border-radius: var(--radius-lg);
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  color: var(--ink);
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.contact-form button:disabled {
  cursor: wait;
  opacity: .65;
}
.form-note { font-size: .8rem; color: #999; margin: 0; }

/* FOOTER */
.site-footer {
  background: var(--navy);
  color: #aab0cc;
  padding: 56px 0 32px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px 48px;
  align-items: center;
}
.footer-grid .logo-img { height: 30px; }
.footer-grid .rounded-text {
  font-family: "Arial Rounded MT Bold", "Arial Rounded MT", Arial, sans-serif;
  font-weight: bold;
  color: #fff;
  margin: 0;
  font-size: 1.1rem;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a { color: #c9d0e6; }
.footer-nav a:hover { color: var(--mint); }
.footer-social {
  display: flex;
  gap: 20px;
}
.footer-social a { color: #c9d0e6; }
.footer-social a:hover { color: var(--mint); }
.footer-address {
  grid-column: 1 / -1;
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  margin: 8px 0 0;
}
.footer-copy {
  grid-column: 1 / -1;
  font-size: .8rem;
  margin: 0;
}
.to-top {
  position: absolute;
  right: 24px;
  top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
}

/* MODALS */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,11,30,.6);
  z-index: 200;
}
.modal-overlay.active { display: block; }
.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 201;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal.active { display: block; }
.modal:focus { outline: none; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.modal ul { padding-left: 20px; }
.modal li { margin-bottom: 8px; }
.modal-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 4px 0 20px;
}
.image-lightbox {
  width: min(94vw, 1400px);
  max-width: none;
  max-height: 92vh;
  padding: 48px 76px 40px;
  overflow: hidden;
  background: rgba(8,8,30,.97);
}
.image-lightbox .modal-close {
  top: 12px;
  right: 16px;
  color: #fff;
}
.image-lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(92vh - 88px);
  margin: 0 auto;
  border-radius: 16px;
  object-fit: contain;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: 400 2.4rem/1 sans-serif;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-count {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-size: .85rem;
  letter-spacing: .08em;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
  .main-nav ul { gap: 14px; }
  .hero-grid, .arts-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .contact-grid, .project-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-media { grid-row: 1; padding: 20px; }
  .project-content { grid-row: 2; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .cert-grid { grid-template-columns: 1fr; }
  .name-origin { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 520px; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.12); }
  .main-nav .language-switcher {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .main-nav .language-switcher a {
    display: inline-block;
    padding: 6px 10px;
    border-top: 0;
  }
  .nav-toggle { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .image-lightbox { padding: 44px 12px 36px; }
  .image-lightbox img { max-height: calc(92vh - 80px); }
  .lightbox-nav {
    width: 42px;
    height: 42px;
    background: rgba(8,8,30,.72);
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .arts-media-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    aspect-ratio: auto;
  }
  .arts-media-pair .arts-image-button { height: auto; }
  .arts-media-pair .arts-image-button:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 3 / 4;
  }
  .arts-media-pair .arts-image-button:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }
  .arts-media-pair .arts-image-button:nth-child(3),
  .arts-media-pair .arts-image-button:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 2 / 3;
  }
}
