/* =====================================================
   Matrixsoft — Design System + Page Styles
   ===================================================== */

:root {
  --brand:       #1F8FD0;
  --brand-deep:  #1668A6;
  --ink:         #0F2438;
  --ink-soft:    #33485C;
  --muted:       #6B7E90;
  --line:        #E5EAF0;
  --paper:       #FFFFFF;
  --paper-2:     #F6F8FB;

  --c-red:     #FF4D3D;
  --c-orange:  #FF8A1E;
  --c-yellow:  #FFD21E;
  --c-green:   #2ECC57;
  --c-blue:    #1F8FD0;
  --c-magenta: #F02B8C;

  --radius: 18px;
  --font-display: 'Kanit', sans-serif;
  --font-body:    'Anuphan', sans-serif;

  --pad: 64px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .005em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.18;
  letter-spacing: -.01em;
}

p { color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── Rainbow dots ── */
.rdots { display: inline-flex; gap: 7px; align-items: center; }
.rdots i {
  width: 10px; height: 10px; border-radius: 50%; display: block; flex: none;
}
.rdots i:nth-child(1) { background: var(--c-red); }
.rdots i:nth-child(2) { background: var(--c-orange); }
.rdots i:nth-child(3) { background: var(--c-yellow); }
.rdots i:nth-child(4) { background: var(--c-green); }
.rdots i:nth-child(5) { background: var(--c-blue); }
.rdots i:nth-child(6) { background: var(--c-magenta); }

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: calc(var(--radius) * .7);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover {
  background: var(--brand-deep);
  box-shadow: 0 10px 24px -10px rgba(31,143,208,.7);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ── Layout helpers ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 90px var(--pad); max-width: 100%; }
.section-alt { background: var(--paper-2); }

.shead {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 54px;
}
.shead h2 { font-size: 42px; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.shead p   { color: var(--muted); font-size: 18px; }

/* =====================================================
   NAV
   ===================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.logo-img-sm {
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 15px;
  white-space: nowrap;
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.nav-links a.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  padding: 10px 18px;
  border-radius: calc(var(--radius) * .7);
  transition: background .2s, color .2s;
}
.nav-links a.nav-cta:hover { background: var(--brand-deep); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* =====================================================
   HERO
   ===================================================== */
.hero { padding: 78px var(--pad) 72px; text-align: center; background: var(--paper); }
.hero-inner { max-width: var(--max); margin: 0 auto; }

.hero h1 {
  font-size: clamp(36px, 5.5vw, 62px);
  font-weight: 700;
  margin: 24px auto 22px;
  max-width: 17ch;
  color: var(--ink);
}
.hero h1 .hl { color: var(--brand); }

.hero .lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 auto 36px;
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.factbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 860px;
  margin: 64px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 4px 24px -8px rgba(15,36,56,.08);
}
.fact {
  padding: 30px 20px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.fact:last-child { border-right: none; }
.fact b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  display: block;
  line-height: 1;
}
.fact span { color: var(--muted); font-size: 15px; margin-top: 8px; display: block; }

/* =====================================================
   ABOUT
   ===================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text h2 {
  font-size: 38px;
  font-weight: 700;
  margin: 18px 0 20px;
  max-width: 18ch;
  color: var(--ink);
}
.about-text p { font-size: 17px; margin-bottom: 16px; }

.mvstack { display: flex; flex-direction: column; gap: 18px; }
.mvcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid;
  border-radius: var(--radius);
  padding: 26px 28px;
}
.mvk {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  display: block;
  margin-bottom: 10px;
}
.mvk em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
}
.mvcard p { font-size: 16px; margin: 0; }

/* =====================================================
   VALUES
   ===================================================== */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.vcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s;
}
.vcard:hover {
  box-shadow: 0 18px 40px -22px rgba(15,36,56,.32);
  transform: translateY(-4px);
  border-color: transparent;
}
.ico-chip {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vcard h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.vcard p  { color: var(--muted); font-size: 14.5px; }

/* =====================================================
   PRODUCTS
   ===================================================== */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s ease, transform .25s ease;
}
.pcard:hover { box-shadow: 0 18px 40px -22px rgba(15,36,56,.3); transform: translateY(-4px); }
.ptop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ptag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
}
.plive {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--c-green);
  font-weight: 600;
  font-family: var(--font-display);
}
.plive i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-green) 22%, transparent);
}
.psoon { font-size: 13px; color: var(--muted); font-family: var(--font-display); font-weight: 500; }
.pcard h3 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.pcard p  { color: var(--muted); font-size: 15px; }

/* =====================================================
   TEAM
   ===================================================== */
.teamgrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.member { text-align: center; }
.ava {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  border: 1px solid var(--line);
}
.ava.plus {
  background: var(--paper-2);
  color: var(--muted);
  border: 1.5px dashed #C4D0DC;
  font-size: 34px;
}
.member h4 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-bottom: 3px; color: var(--ink); }
.member span { color: var(--muted); font-size: 13.5px; }
.member.join h4 { color: var(--brand); }

/* =====================================================
   CULTURE
   ===================================================== */
.culgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cperk {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid;
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: box-shadow .25s ease, transform .2s;
}
.cperk:hover { box-shadow: 0 8px 24px -12px rgba(15,36,56,.18); transform: translateY(-2px); }
.cperk .e { font-size: 30px; line-height: 1; flex: none; }
.cperk h4 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 2px 0 5px; color: var(--ink); }
.cperk p  { color: var(--muted); font-size: 14px; margin: 0; }

/* =====================================================
   CONTACT BAND
   ===================================================== */
.contactband { padding: 90px var(--pad); }
.cband {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border-radius: calc(var(--radius) * 1.6);
  padding: 72px 64px;
  text-align: center;
}
.bigm-wm {
  position: absolute;
  right: -30px;
  bottom: -50px;
  opacity: .12;
  pointer-events: none;
}
.cinner { position: relative; }
.cband h2 { font-size: 46px; font-weight: 700; color: #fff; margin: 18px 0 16px; }
.clead {
  color: rgba(255,255,255,.78);
  font-size: 19px;
  max-width: 48ch;
  margin: 0 auto 32px;
}
.cinfo { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cpill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
  border-radius: calc(var(--radius) * .7);
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.cpill:hover { background: var(--brand-deep); transform: translateY(-2px); }
.cpill.ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.28);
}
.cpill.ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.caddr { color: rgba(255,255,255,.5); font-size: 14px; margin-top: 26px; }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.copy { color: var(--muted); font-size: 14px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 980px) {
  :root { --pad: 32px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 20px var(--pad) 28px;
    gap: 16px;
    z-index: 99;
  }
  .nav-links.open a.nav-cta { align-self: flex-start; }
  .hamburger { display: flex; }

  .hero { padding: 56px var(--pad) 52px; }
  .factbar { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(2) { border-right: none; }
  .fact:nth-child(3) { border-top: 1px solid var(--line); }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .grid3 { grid-template-columns: 1fr; }

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

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

  .cband { padding: 48px 32px; }
  .cband h2 { font-size: 34px; }
  .clead { font-size: 16px; }

  .footer { justify-content: center; text-align: center; }
  .footer .logo { order: -1; width: 100%; justify-content: center; }
}

@media (max-width: 600px) {
  :root { --pad: 20px; }

  .hero h1 { font-size: 34px; }
  .factbar { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: 1fr; }
  .teamgrid { grid-template-columns: repeat(2, 1fr); }
  .culgrid { grid-template-columns: 1fr; }
  .section { padding: 60px var(--pad); }
}
