/* ── Hoverex / Cosmicegg cosmic theme ── */
:root {
  --bg: #050510;
  --bg-card: #23293b;
  --bg-deep: #030309;
  --text: #9aa7bc;
  --text-bright: #fcfcfc;
  --accent: #ffffff;
  --pink: #d2538a;
  --cyan: #20bfe1;
  --blue: #017bfd;
  --blue-hover: #1aafe9;
  --border: rgba(154, 167, 188, 0.18);
  --font: "Mulish", system-ui, sans-serif;
  --font-thai: "IBM Plex Sans Thai", var(--font);
  --max-w: 1170px;
  --radius: 7px;
  --radius-pill: 35px;
  --header-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

html[lang="th"] body {
  font-family: var(--font-thai);
}

html[lang="en"] body {
  font-family: var(--font);
}

body {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: min(var(--max-w), calc(100% - 3.75rem));
  margin-inline: auto;
}

/* ── Header (transparent over hero) ── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 2rem 1.875rem 0.625rem;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(5, 5, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-block: 0.75rem;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1800px;
  margin-inline: auto;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.header__logo-img {
  display: block;
  height: 50px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

@media (max-width: 520px) {
  .header__logo-img {
    height: 44px;
    max-width: min(300px, 72vw);
  }
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.header__links {
  display: flex;
  list-style: none;
  gap: 0;
}

.header__links a {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.5rem 1.2rem;
  transition: color 0.2s var(--ease);
}

.header__links a:hover {
  color: var(--accent);
}

.header__cta {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 0.45em 2.16em;
  margin-left: 1.375rem;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.header__cta:hover {
  color: var(--text);
  background: var(--accent);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.lang-switch__btn {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.lang-switch__btn:hover {
  color: var(--accent);
}

.lang-switch__btn.is-active {
  color: var(--accent);
  background: rgba(32, 191, 225, 0.15);
}

.lang-switch__sep {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--border);
  user-select: none;
}

.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.header__toggle span {
  display: block;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.header__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.header__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Hero ── */
/* hero-bg: local galaxy nebula (2025-06-12) — not earth-at-night CDN */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 2rem) 1.875rem 4rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(5, 5, 16, 0.45) 70%, var(--bg) 100%),
    url("assets/hero-bg.jpg") center / cover no-repeat,
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1920&q=80") center / cover no-repeat;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(830px, 100%);
  margin-left: clamp(0%, 12vw, 18.6%);
}

.hero__eyebrow {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

html[lang="th"] .hero__title,
html[lang="th"] .section__title,
html[lang="th"] .contact-form__heading,
html[lang="th"] .contact-info__heading {
  font-family: var(--font-thai);
}

html[lang="en"] .hero__title,
html[lang="en"] .section__title,
html[lang="en"] .contact-form__heading,
html[lang="en"] .contact-info__heading {
  font-family: var(--font);
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
}

.hero__lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  max-width: 58ch;
  margin-bottom: 1.75rem;
}

.hero__values {
  list-style: none;
  margin-bottom: 2.5rem;
  padding-left: 0;
  max-width: 58ch;
}

.hero__values li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.625rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
}

.hero__values li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}

.btn--primary {
  color: var(--accent);
  background: linear-gradient(150deg, var(--blue) 20%, var(--cyan) 80%);
  padding: 1.2em 3.55em;
}

.btn--primary:hover {
  background: linear-gradient(320deg, #db5c8b 20%, #961484 80%);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--accent);
  border: 2px solid var(--accent);
  background: transparent;
  padding: 0.7em 2.65em;
}

.btn--ghost:hover {
  color: var(--bg-deep);
  background: var(--accent);
}

.btn--full {
  width: 100%;
}

/* ── Trust ribbon ── */
.trust {
  padding: 2.5rem 0;
  background: var(--bg);
  border-block: 1px solid var(--border);
}

.trust__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem 3rem;
}

.trust__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.875rem;
}

.trust__item dt {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.trust__item dd {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--accent);
  max-width: 32ch;
}

/* ── Sections ── */
.section {
  padding: 8.125rem 1.875rem;
  background: var(--bg);
}

.section--cosmic {
  position: relative;
  background:
    linear-gradient(180deg, rgba(5, 5, 16, 0.83) 70%, var(--bg) 100%),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1920&q=80") center / cover no-repeat;
}

.section--cosmic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #000 0%, transparent 25%);
  pointer-events: none;
}

.section--cosmic > .container {
  position: relative;
  z-index: 1;
}

.section__header {
  margin-bottom: 3.5rem;
}

.section__header--center {
  text-align: center;
}

.section__marker {
  display: inline-block;
  width: 21px;
  height: 21px;
  margin-bottom: 1.5rem;
  background: radial-gradient(circle at 30% 30%, var(--cyan), var(--blue));
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(32, 191, 225, 0.4);
}

.section__title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--text-bright);
  margin-bottom: 0.625rem;
}

.section__subtitle {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.section__lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  max-width: 68ch;
  margin-top: 0.5rem;
}

.section__lead--center {
  margin-inline: auto;
  text-align: center;
}

/* ── Capability cards ── */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.25s var(--ease);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-3px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--cyan);
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
}

.feature-card__title {
  font-family: var(--font);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.375rem;
}

html[lang="th"] .feature-card__subtitle,
html[lang="th"] .feature-card__callout-label,
html[lang="th"] .diff-card__label {
  font-family: var(--font-thai);
}

html[lang="en"] .feature-card__subtitle,
html[lang="en"] .feature-card__callout-label,
html[lang="en"] .diff-card__label {
  font-family: var(--font);
}

.feature-card__subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1.125rem;
}

.feature-card__body {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.feature-card__callout {
  padding: 1rem 1.125rem;
  border-radius: var(--radius);
  background: rgba(32, 191, 225, 0.08);
  border-left: 3px solid var(--cyan);
}

.feature-card__callout-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.feature-card__callout p {
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
}

/* ── Differentiators ── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.diff-card {
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
}

.diff-card__num {
  display: block;
  font-family: var(--font);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 1rem;
  line-height: 1;
}

.diff-card__title {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.375rem;
}

.diff-card__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.diff-card__desc {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.8;
}

/* ── About ── */
.about {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.about__visual {
  border-radius: var(--radius);
  min-height: 320px;
  background:
    linear-gradient(180deg, transparent 40%, rgba(5, 5, 16, 0.7) 100%),
    url("https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?w=900&q=80") bottom center / cover no-repeat;
}

.about__body p {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.85;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.contact-form-wrap {
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
}

.contact-form__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

html[lang="th"] .form-field input,
html[lang="th"] .form-field select,
html[lang="th"] .form-field textarea {
  font-family: var(--font-thai);
}

html[lang="en"] .form-field input,
html[lang="en"] .form-field select,
html[lang="en"] .form-field textarea {
  font-family: var(--font);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  background: var(--bg-deep);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.25rem 0.75rem 2rem;
  transition: color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(154, 167, 188, 0.6);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(32, 191, 225, 0.35);
}

.form-field input.is-invalid,
.form-field select.is-invalid,
.form-field textarea.is-invalid {
  box-shadow: 0 0 0 2px rgba(210, 83, 138, 0.5);
}

.form-field__error {
  display: block;
  font-size: 0.75rem;
  color: var(--pink);
  margin-top: 0.375rem;
  min-height: 1rem;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
  border-radius: var(--radius);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA7BC' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 2.75rem;
}

.form-success {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(32, 191, 225, 0.12);
  margin-top: 1rem;
}

.form-success svg {
  width: 20px;
  height: 20px;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.form-success p {
  font-size: 1rem;
  color: var(--accent);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info__card {
  padding: 2rem 1.875rem;
  border-radius: var(--radius);
  background: var(--bg-card);
}

.contact-info__heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.contact-info__address {
  font-style: normal;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.8;
}

.location-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.location-card__map {
  position: relative;
  height: 200px;
  background:
    linear-gradient(180deg, rgba(5, 5, 16, 0.3) 0%, rgba(5, 5, 16, 0.85) 100%),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=800&q=80") center / cover no-repeat;
}

.location-card__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.location-card__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(32, 191, 225, 0.6);
}

.location-card__label {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.location-card__coords {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text);
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Footer ── */
.site-footer {
  padding: 3.5rem 1.875rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  max-width: var(--max-w);
  margin-inline: auto;
}

.footer__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.footer__logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-left: auto;
}

.footer__nav a {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.footer__nav a:hover {
  color: var(--accent);
}

.footer__copy {
  width: 100%;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* ── Scroll reveal (progressive: visible without JS) ── */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .card-grid--3,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    margin-left: 0;
  }

  .section {
    padding: 6rem 1.875rem;
  }
}

@media (max-width: 768px) {
  .header__toggle {
    display: flex;
  }

  .header__nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.5rem;
    background: rgba(3, 3, 9, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
  }

  .header__nav.is-open {
    transform: translateX(0);
  }

  .header__links {
    flex-direction: column;
  }

  .header__links a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .header__cta {
    margin: 1rem 0 0;
    text-align: center;
  }

  .lang-switch {
    margin: 1rem 0 0;
    justify-content: center;
  }

  .trust__list {
    flex-direction: column;
    gap: 1.25rem;
  }

  .footer__nav {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(var(--max-w), calc(100% - 2.5rem));
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal,
  html.js .reveal.is-visible,
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
