:root {
  --bg: #0a1120;
  --bg-alt: #0e1830;
  --card: #0f1b33;
  --card-border: rgba(148, 163, 184, 0.14);
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --brick: #9c3a34;
  --brick-hover: #832f2a;
  --radius: 14px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Kanit", "Noto Sans Thai", sans-serif;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, span, a, blockquote, label {
  overflow-wrap: break-word;
  word-break: break-word;
}

h1, h2, h3, h4 { font-weight: 600; margin: 0 0 0.5em; line-height: 1.25; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; }

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

.icon {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section {
  padding: 96px 0;
  scroll-margin-top: 76px;
  border-bottom: 1px solid var(--card-border);
}
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head p { font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #051220; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: rgba(255,255,255,0.25); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 17, 32, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #0ea5e9 60%, #0369a1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #041019;
  font-weight: 700;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  padding: 190px 0 120px;
  overflow: hidden;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(56,189,248,0.16), transparent 60%),
    radial-gradient(500px 400px at 10% 90%, rgba(34,211,238,0.10), transparent 60%),
    linear-gradient(180deg, #0a1120 0%, #0a1120 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 20%, black, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 34px;
}
.hero-quote {
  display: inline-block;
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Pillars / Why cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,0.35); }
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(56,189,248,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.08rem; color: var(--text); }
.card p { margin: 0; font-size: 0.94rem; }

/* Featured Solutions */
.featured { background: var(--bg); }
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.featured-card {
  position: relative;
  background: linear-gradient(180deg, rgba(56,189,248,0.07), rgba(56,189,248,0.01) 40%), var(--card);
  border: 1px solid rgba(56,189,248,0.28);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
}
.featured-card:hover { transform: none; }
.featured-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(56,189,248,0.14);
  margin-bottom: 22px;
}
.featured-icon .icon { width: 30px; height: 30px; }
.featured-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.featured-card > p { font-size: 0.96rem; margin-bottom: 24px; }
.featured-card .service-features { margin-bottom: 28px; }
.featured-cta { align-self: flex-start; margin-top: auto; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.service-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
}
.service-card .card-icon { margin-bottom: 16px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.service-card > p { font-size: 0.93rem; margin-bottom: 16px; }
.service-features { display: flex; flex-direction: column; gap: 10px; }
.service-feature { display: flex; gap: 10px; align-items: flex-start; }
.service-feature .icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.service-feature strong { display: block; font-size: 0.9rem; color: var(--text); font-weight: 500; }
.service-feature span { font-size: 0.85rem; color: var(--text-muted); }

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.team-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-weight: 500;
  font-size: 0.98rem;
}
.team-card .icon { width: 24px; height: 24px; flex-shrink: 0; }
.team-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(90deg, rgba(56,189,248,0.12), rgba(56,189,248,0.02));
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-weight: 500;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-info-item .card-icon { flex-shrink: 0; margin-bottom: 0; }
.contact-info-item h4 { margin: 0 0 4px; font-size: 0.95rem; color: var(--text); }
.contact-info-item p { margin: 0; font-size: 0.92rem; }

.form-field { position: relative; margin-bottom: 34px; }
.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(148,163,184,0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 8px 2px 10px;
  outline: none;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.form-field textarea { min-height: 70px; }
.form-field label {
  position: absolute;
  left: 2px;
  top: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); }
.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label {
  top: -14px;
  font-size: 0.76rem;
  color: var(--accent);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.btn-submit {
  background: var(--brick);
  color: #fff;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 15px 42px;
  border: none;
  font-size: 0.92rem;
  cursor: pointer;
}
.btn-submit:hover { background: var(--brick-hover); }

.form-status {
  margin-top: 16px;
  font-size: 0.9rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

/* Footer */
.footer {
  background: var(--bg-alt);
  padding: 56px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand p { max-width: 320px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-links h4 { font-size: 0.85rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .grid-3, .team-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .featured-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 150px 0 80px; }
  .grid-3, .team-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-top { flex-direction: column; }
  .featured-card { padding: 28px; }
}

/* Mobile nav panel */
.nav-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 24px;
  border-top: 1px solid var(--card-border);
}
.nav-panel.open { display: flex; }
.nav-panel a {
  padding: 12px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
  font-weight: 500;
}
.nav-panel .btn { margin-top: 12px; justify-content: center; }
