/* ==========================================================
   SYSTEM ONE SERVICE — main stylesheet
   Brand: SOS orange + charcoal (from logo)
   ========================================================== */
:root {
  --orange: #f26a21;
  --orange-600: #d9560f;
  --orange-50: #fff3eb;
  --ink: #1c1f24;
  --ink-2: #2a2e35;
  --charcoal: #3d4148;
  --text: #3b4049;
  --muted: #6b7280;
  --line: #e7e9ee;
  --bg: #ffffff;
  --soft: #f6f7fa;
  --green-line: #06c755;
  --fb: #1877f2;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(20, 24, 31, .06);
  --shadow: 0 10px 30px rgba(20, 24, 31, .08);
  --shadow-lg: 0 24px 60px rgba(20, 24, 31, .14);
  --header-h: 72px;
  --font-head: "Prompt", system-ui, sans-serif;
  --font-body: "Sarabun", "Prompt", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  padding: .75em 1.4em; border-radius: 999px; border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn--lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(242, 106, 33, .35); }
.btn--primary:hover { background: var(--orange-600); box-shadow: 0 12px 28px rgba(242, 106, 33, .45); }
.btn--line { background: var(--green-line); color: #fff; box-shadow: 0 8px 22px rgba(6, 199, 85, .3); }
.btn--outline { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn--outline:hover { background: var(--orange); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: var(--orange-600); }
.btn--dark { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 500;
  font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange); background: var(--orange-50);
  padding: .35em 1em; border-radius: 999px; margin-bottom: 14px;
}
.eyebrow--light { background: rgba(242, 106, 33, .15); color: #ff9a5c; }

.link-arrow { font-family: var(--font-head); font-weight: 500; color: var(--orange); display: inline-flex; align-items: center; gap: 6px; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  background: rgba(28, 31, 36, .0);
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.header.scrolled {
  background: rgba(28, 31, 36, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand img { width: 48px; height: 48px; background: #fff; border-radius: 12px; padding: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-head); }
.brand__text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; }
.brand__text small { font-size: .68rem; letter-spacing: .14em; color: #ff9a5c; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  font-family: var(--font-head); font-size: .95rem; color: rgba(255, 255, 255, .82);
  padding: 8px 12px; border-radius: 10px; position: relative; transition: color .2s;
}
.nav__link:hover, .nav__link.active { color: #fff; }
.nav__link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--orange); border-radius: 2px;
}
.nav__cta { margin-left: 10px; padding: .55em 1.1em; font-size: .92rem; }

.burger { display: none; width: 44px; height: 44px; border: 0; background: rgba(255,255,255,.08); border-radius: 12px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s, top .3s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(242, 106, 33, .22), transparent 60%),
    linear-gradient(160deg, #1c1f24 0%, #262a31 55%, #1a1c20 100%);
  padding: calc(var(--header-h) + 60px) 0 120px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero__glow { position: absolute; width: 420px; height: 420px; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(242,106,33,.25), transparent 70%); filter: blur(10px); }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero h1 .eyebrow { display: table; font-size: .85rem; line-height: 1.6; font-weight: 500; margin-bottom: 18px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--orange); color: #fff; padding: 10px 16px; border-radius: 10px; font-family: var(--font-head); }
.skip-link:focus { top: 12px; }
.notes__title { font-size: 1.05rem; color: var(--orange-600); }
.table th.th { background: transparent; color: var(--ink); text-align: left; font-weight: 600; white-space: normal; padding: 12px 16px; border-top: 1px solid var(--line); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.4rem + 4vw, 4rem); font-weight: 700; line-height: 1.15; margin-bottom: 20px; }
.hero .sos {
  background: linear-gradient(90deg, #ff8a3d, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}
.lead { font-size: 1.15rem; color: rgba(255, 255, 255, .78); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 40px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats li {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px; padding: 12px 18px; display: flex; flex-direction: column; min-width: 130px;
}
.hero__stats strong { font-family: var(--font-head); font-size: 1.35rem; color: #fff; }
.hero__stats span { font-size: .85rem; color: rgba(255, 255, 255, .65); }

.hero__media { position: relative; display: flex; justify-content: center; }
.hero__orb {
  position: absolute; width: 85%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.75) 55%, rgba(255,255,255,.1) 72%, transparent 73%);
  box-shadow: 0 0 0 14px rgba(242,106,33,.12), 0 0 0 30px rgba(242,106,33,.06);
}
.hero__img { position: relative; width: min(380px, 80%); animation: float 6s ease-in-out infinite; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ink); font-family: var(--font-head); font-size: .85rem; font-weight: 500;
  padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); white-space: nowrap;
}
.float-card svg { color: var(--orange); width: 18px; height: 18px; }
.float-card--a { top: 8%; left: 0; animation: float 5s ease-in-out infinite .5s; }
.float-card--b { bottom: 10%; right: 0; animation: float 5.5s ease-in-out infinite 1s; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--green { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Highlights ---------- */
.highlights { position: relative; margin-top: -70px; z-index: 2; }
.highlights__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hl-card {
  display: flex; gap: 20px; align-items: flex-start;
  background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.hl-card img { width: 88px; height: 88px; object-fit: contain; flex-shrink: 0; }
.hl-card h3 { font-size: 1.12rem; }
.hl-card p { font-size: .97rem; color: var(--muted); margin-bottom: .6em; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: linear-gradient(180deg, #1c1f24, #23272d); color: rgba(255,255,255,.8); }
.section__head { text-align: center; max-width: 780px; margin: 0 auto 52px; }
.section__head p { color: var(--muted); font-size: 1.05rem; }
.section__head--light h2 { color: #fff; }
.section__head--light p { color: rgba(255,255,255,.65); }

/* Checklists */
.checklist li { position: relative; padding-left: 32px; margin-bottom: 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f26a21' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.checklist--lg li { padding: 12px 14px 12px 48px; background: #fff; border-radius: 12px; border: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.checklist--lg li::before { left: 14px; top: 50%; transform: translateY(-50%); }
.section--soft .checklist--lg li { background: #fff; }

/* What is */
.what { display: grid; grid-template-columns: 1.2fr 1fr .9fr; gap: 24px; align-items: stretch; }
.what__intro { padding: 8px 8px 8px 0; }
.what__intro h3 { font-size: 1.4rem; }
.what__note {
  display: flex; gap: 10px; align-items: center; background: var(--orange-50); color: var(--orange-600);
  padding: 12px 16px; border-radius: 12px; font-weight: 600; font-family: var(--font-head); font-size: .95rem;
}
.what__note svg { width: 22px; height: 22px; }
.what__box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.what__box h4 { font-size: 1.1rem; margin-bottom: 16px; }
.what__box--dark { background: linear-gradient(150deg, var(--ink), var(--charcoal)); border: 0; color: #fff; }
.what__box--dark h4 { color: #fff; }
.taglist { display: flex; flex-direction: column; gap: 10px; }
.taglist li {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-left: 3px solid var(--orange); border-radius: 10px; padding: 10px 14px; font-weight: 500;
}

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-card {
  position: relative; background: #fff; border-radius: var(--radius); padding: 34px 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.svc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.svc-card--featured { border: 2px solid var(--orange); box-shadow: var(--shadow); }
.svc-card .badge {
  position: absolute; top: 18px; right: 18px; background: var(--orange); color: #fff;
  font-family: var(--font-head); font-size: .75rem; padding: 4px 12px; border-radius: 999px;
}
.svc-card__icon {
  width: 84px; height: 84px; border-radius: 22px; background: var(--orange-50);
  display: grid; place-items: center; margin-bottom: 20px;
}
.svc-card__icon img { width: 56px; height: 56px; object-fit: contain; }
.svc-card h3 { margin-bottom: 2px; font-size: 1.3rem; }
.svc-card__en { font-family: var(--font-head); color: var(--orange); font-weight: 500; font-size: .95rem; margin-bottom: 18px; }
.svc-card .checklist { flex: 1; margin-bottom: 22px; }
.svc-card .btn { align-self: flex-start; }

/* Why */
.why__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.why__item {
  text-align: center; padding: 30px 18px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); transition: border-color .3s, transform .3s, box-shadow .3s;
}
.why__item:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: var(--shadow); }
.why__icon {
  width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange-50);
}
.why__icon img { width: 52px; height: 52px; object-fit: contain; }
.why__item p { margin: 0; font-family: var(--font-head); font-weight: 500; color: var(--ink); font-size: 1rem; line-height: 1.5; }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split--reverse .split__media { order: 2; }
.split__content p { color: var(--muted); }
.split__content .checklist { margin: 24px 0 28px; display: grid; gap: 10px; }
.split__content .checklist li { margin: 0; }
.media-frame {
  position: relative; border-radius: 28px; padding: 40px;
  background: radial-gradient(circle at 30% 20%, #fff, var(--orange-50));
  border: 1px solid #ffe2cf; box-shadow: var(--shadow);
}
.media-frame::after {
  content: ""; position: absolute; inset: auto -14px -14px auto; width: 120px; height: 120px;
  border-radius: 24px; background: var(--orange); opacity: .12; z-index: -1;
}
.media-frame img { margin: 0 auto; max-height: 380px; object-fit: contain; }
.media-frame--cloud { background: radial-gradient(circle at 70% 20%, #fff, #eef3fb); border-color: #dfe7f4; }

/* Products */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.tab {
  font-family: var(--font-head); font-size: .95rem; cursor: pointer;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.14); padding: 9px 18px; border-radius: 999px; transition: all .2s;
}
.tab:hover { color: #fff; border-color: rgba(255,255,255,.35); }
.tab.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.prod {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  transition: background .25s, border-color .25s, transform .25s;
}
.prod:hover { background: rgba(242,106,33,.1); border-color: rgba(242,106,33,.5); transform: translateY(-3px); }
.prod.hidden { display: none; }
.prod.pop { animation: pop .35s ease; }
.prod__ic { width: 50px; height: 50px; flex-shrink: 0; border-radius: 12px; background: #fff; display: grid; place-items: center; }
.prod__ic img { width: 32px; height: 32px; object-fit: contain; }
.prod strong { display: block; color: #fff; font-family: var(--font-head); font-weight: 500; font-size: 1rem; }
.prod small { display: block; color: rgba(255,255,255,.6); font-size: .88rem; line-height: 1.45; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Clients */
.clients { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 30px; box-shadow: var(--shadow-sm); }
.clients img { margin: 0 auto; }

/* CTA */
.cta { background: linear-gradient(110deg, var(--orange-600), var(--orange) 50%, #ff8a3d); color: #fff; padding: 60px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; right: -100px; top: -160px; background: rgba(255,255,255,.12); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; position: relative; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; color: rgba(255,255,255,.88); }

/* Contact */
.contact { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: stretch; }
.contact__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.c-card {
  display: flex; gap: 14px; align-items: center; background: #fff; border-radius: 14px; padding: 18px;
  border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; min-width: 0;
}
a.c-card:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.c-card--wide { grid-column: 1 / -1; }
.c-card__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-50); color: var(--orange); flex-shrink: 0; }
.c-card__ic svg { width: 22px; height: 22px; }
.c-card__ic--line { background: #e6f9ee; color: var(--green-line); }
.c-card__ic--fb { background: #e8f0fe; color: var(--fb); }
.c-card small { display: block; color: var(--muted); font-size: .85rem; }
.c-card strong { display: block; color: var(--ink); font-family: var(--font-head); font-weight: 500; font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; }
.contact__map { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 380px; box-shadow: var(--shadow); border: 1px solid var(--line); background: #e9ecf1; }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contact__mapbtn { position: absolute; left: 16px; bottom: 16px; }

/* Footer */
.footer { background: var(--ink); color: rgba(255,255,255,.65); padding-top: 64px; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.footer h4, .footer__title { color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1rem; margin: 0 0 14px; }
.footer address { font-style: normal; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--orange); }
.footer__brand p { margin: 16px 0; max-width: 320px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: background .2s; }
.socials a:hover { background: var(--orange); color: #fff; }
.socials svg { width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: .85rem; text-align: center; }

/* Floating buttons (mobile) & back-to-top */
.fab { display: none; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--orange); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 24px; height: 24px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__img, .float-card { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   Mega menu
   ========================================================== */
.nav__item { position: relative; }
.nav__toggle { background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.nav__toggle svg { width: 18px; height: 18px; transition: transform .25s; }
.mega {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translate(-50%, 8px);
  width: min(1060px, 94vw); display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.has-mega:hover .nav__toggle svg { transform: rotate(180deg); }
.mega__title { font-family: var(--font-head); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin: 4px 10px 8px; }
.mega__link { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; transition: background .2s; }
.mega__link:hover { background: var(--orange-50); }
.mega__ic { width: 30px; height: 30px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; flex-shrink: 0; }
.mega__ic img { width: 18px; height: 18px; object-fit: contain; }
.mega__link strong { display: block; font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: var(--ink); line-height: 1.3; }
.mega__link small { display: block; font-size: .76rem; color: var(--muted); line-height: 1.35; }

/* ==========================================================
   Inner pages
   ========================================================== */
.section--tight { padding: 56px 0; }
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 500px at 90% 0%, rgba(242,106,33,.25), transparent 60%),
    linear-gradient(160deg, #1c1f24 0%, #262a31 60%, #1a1c20 100%);
  padding: calc(var(--header-h) + 50px) 0 70px;
}
.page-hero--sm { padding-bottom: 50px; }
.page-hero__inner { position: relative; display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: center; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); font-weight: 700; margin-bottom: 6px; }
.page-hero__en { font-family: var(--font-head); color: #ff9a5c; font-size: 1.1rem; margin-bottom: 14px; }
.page-hero .hero__actions { margin: 26px 0 0; }
.page-hero__media { display: flex; justify-content: center; }
.page-hero__disc {
  width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 14px rgba(242,106,33,.14), 0 0 0 30px rgba(242,106,33,.06), var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.page-hero__disc img { width: 58%; height: 58%; object-fit: contain; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.crumbs a:hover { color: #fff; }
.crumbs b { color: #ff9a5c; font-weight: 500; }

.intro-card { display: flex; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.intro-card__bar { width: 5px; border-radius: 4px; background: linear-gradient(var(--orange), #ffb07a); flex-shrink: 0; }
.intro-card h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem); }
.intro-card p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* Plans */
.plan-group--next { margin-top: 80px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.plans--4 { grid-template-columns: repeat(4, 1fr); }
.plans--3 { grid-template-columns: repeat(3, 1fr); max-width: 1040px; margin: 0 auto; }
.plan {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s;
}
.plan:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.plan--featured { border: 2px solid var(--orange); box-shadow: var(--shadow); }
.plan__badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px;
  background: var(--orange); color: #fff; font-family: var(--font-head); font-size: .78rem; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
}
.plan__badge svg { width: 13px; height: 13px; }
.plan__tag { font-family: var(--font-head); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.plan__name { font-size: 1.25rem; margin: 2px 0 12px; }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px dashed var(--line); }
.plan__price strong { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--orange); line-height: 1; }
.plan__price span { font-size: .9rem; color: var(--muted); }
.plan__price--quote strong { font-size: 1.4rem; }
.plan__desc { font-size: .95rem; color: var(--muted); margin-top: -4px; }
.specs { margin: 0 0 16px; display: grid; gap: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--soft); font-size: .92rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.plan__features { margin-bottom: 18px; font-size: .95rem; }
.plan__features li { margin-bottom: 8px; }
.checklist li.neg { color: var(--muted); }
.checklist li.neg::before {
  background: #fdecec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dc2626' d='M18.3 5.7 12 12l6.3 6.3-1.4 1.4L10.6 13.4 4.3 19.7l-1.4-1.4L9.2 12 2.9 5.7l1.4-1.4 6.3 6.3 6.3-6.3z'/%3E%3C/svg%3E") center/12px no-repeat;
}
.plan__cta { margin-top: auto; width: 100%; }

/* When / features / lists / apps */
.when { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.when--3 { grid-template-columns: repeat(3, 1fr); }
.when__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; position: relative; overflow: hidden; }
.when__item::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--orange-50); }
.when__num { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--orange); line-height: 1; display: block; margin-bottom: 12px; }
.when__item p { margin: 0; font-family: var(--font-head); font-weight: 500; color: var(--ink); position: relative; z-index: 1; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .25s, box-shadow .25s; }
.feature:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.feature__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--orange); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.feature__ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.list-card { background: linear-gradient(160deg, #fff, var(--soft)); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.list-card h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.6rem); }
.list-card > p { color: var(--muted); }
.lists--single .checklist--cols { columns: 2; column-gap: 32px; }
.checklist--cols li { break-inside: avoid; }

.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.app { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; border-left: 4px solid var(--orange); }
.app strong { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.app span { font-size: .9rem; color: var(--muted); line-height: 1.5; display: block; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: #fff; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: .95rem; }
.table th { background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 500; text-align: center; padding: 14px 16px; white-space: nowrap; }
.table th:first-child { text-align: left; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); text-align: center; }
.table td.th { text-align: left; font-weight: 600; color: var(--ink); }
.table tbody tr:nth-child(even) { background: var(--soft); }
.table tbody tr:hover { background: var(--orange-50); }
.table td.yes svg { color: #16a34a; width: 20px; height: 20px; }
.table td.no svg { color: #dc2626; width: 18px; height: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.notes { background: #fffaf3; border: 1px solid #ffe2c2; border-left: 5px solid var(--orange); border-radius: var(--radius-sm); padding: 24px 28px; }
.notes h3 { font-size: 1.05rem; color: var(--orange-600); }
.notes ul { list-style: disc; padding-left: 20px; }
.notes li { margin-bottom: 6px; color: var(--text); }

/* Inquiry + form */
.inquiry { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.inquiry__info p { color: var(--muted); }
.inquiry__list { display: grid; gap: 10px; margin-top: 20px; }
.inquiry__list a { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 500; color: var(--ink); }
.inquiry__list a:hover { color: var(--orange); }
.inquiry__list svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--orange-50); color: var(--orange); }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field > span { font-family: var(--font-head); font-size: .9rem; font-weight: 500; color: var(--ink); }
.field b { color: var(--orange); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); width: 100%;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--soft);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); background: #fff; box-shadow: 0 0 0 4px rgba(242,106,33,.12); }
.field--err input, .field--err textarea { border-color: #dc2626; background: #fff5f5; }
.field small { color: #dc2626; font-size: .85rem; }
.form__submit { width: 100%; }
.form__submit svg { width: 18px; height: 18px; }
.form__note { text-align: center; font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.alert--error { background: #fff1f1; color: #b91c1c; border: 1px solid #fecaca; }
.success { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 30px; text-align: center; box-shadow: var(--shadow); }
.success__ic { width: 72px; height: 72px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; margin: 0 auto 18px; }
.success__ic svg { width: 36px; height: 36px; }
.success a:not(.btn) { color: var(--orange); font-weight: 600; }

.products--light .prod { background: #fff; border-color: var(--line); }
.products--light .prod:hover { background: var(--orange-50); border-color: var(--orange); }
.products--light .prod strong { color: var(--ink); }
.products--light .prod small { color: var(--muted); }
.products--light .prod__ic { background: var(--soft); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.stats div { background: var(--soft); border-radius: 14px; padding: 16px; text-align: center; }
.stats strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--orange); }
.stats span { font-size: .85rem; color: var(--muted); }
.feature--link h3 { color: var(--ink); }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post-card__img img { width: 100%; aspect-ratio: 1200 / 628; object-fit: cover; }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.2rem; margin-bottom: 8px; }
.post-card h2 a:hover { color: var(--orange); }
.post-card__body > p:not(.post-meta) { color: var(--muted); font-size: .97rem; flex: 1; }
.post-meta { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.post-meta--light { color: rgba(255,255,255,.7); margin-top: 10px; }
.prose { max-width: 780px; margin: 0 auto; font-size: 1.08rem; line-height: 1.85; }
.prose__cover { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 36px; }
.prose h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin: 40px 0 14px; padding-left: 14px; border-left: 4px solid var(--orange); }
.prose h3 { font-size: 1.25rem; margin: 32px 0 12px; }
.prose ul { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.prose li { position: relative; padding-left: 30px; }
.prose li::before { content: ""; position: absolute; left: 6px; top: .75em; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.prose strong { color: var(--ink); }
.prose__table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.prose__table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .97rem; line-height: 1.55; }
.prose__table thead th { background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 500; padding: 12px 14px; text-align: left; }
.prose__table tbody th { text-align: left; color: var(--ink); font-weight: 600; white-space: nowrap; }
.prose__table td, .prose__table tbody th { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.prose__table tbody tr:nth-child(even) { background: var(--soft); }
.post-card__title { font-size: 1.1rem; margin-bottom: 12px; flex: 1; }
.post-card__title a:hover { color: var(--orange); }
.prose a { color: var(--orange-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.faq__item[open] { border-color: var(--orange); box-shadow: var(--shadow); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { margin: 0; font-size: 1.05rem; font-weight: 500; }
.faq__ic { width: 32px; height: 32px; border-radius: 50%; background: var(--orange-50); color: var(--orange); display: grid; place-items: center; flex-shrink: 0; transition: transform .25s; }
.faq__ic svg { width: 20px; height: 20px; }
.faq__item[open] .faq__ic { transform: rotate(180deg); }
.faq__item p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1100px) {
  .plans--4 { grid-template-columns: repeat(2, 1fr); }
  .apps { grid-template-columns: repeat(3, 1fr); }
  .when { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .why__grid { grid-template-columns: repeat(3, 1fr); }
  .what { grid-template-columns: 1fr 1fr; }
  .what__intro { grid-column: 1 / -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .burger { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(28, 31, 36, .98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 12px 16px 20px; max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s, opacity .3s, visibility .3s;
    box-shadow: 0 20px 40px rgba(0,0,0,.3);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0; }
  .nav__link.active::after { display: none; }
  .nav__link.active { color: var(--orange); }
  .nav__cta { margin: 14px 0 0; padding: .85em; font-size: 1rem; }
  .header { background: rgba(28, 31, 36, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

  .hero { padding: calc(var(--header-h) + 40px) 0 110px; text-align: center; }
  .hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 .eyebrow { margin-inline: auto; }
  .lead { margin-inline: auto; }
  .hero__actions, .hero__stats { justify-content: center; }
  .hero__media { max-width: 420px; margin: 0 auto; width: 100%; }

  .highlights__grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse .split__media { order: 0; }
  .media-frame { max-width: 440px; margin: 0 auto; padding: 28px; }
  .contact { grid-template-columns: 1fr; }
  .cta__inner { flex-direction: column; text-align: center; }

  /* mega menu → accordion */
  .nav__item { display: flex; flex-direction: column; }
  .nav__toggle { justify-content: space-between; width: 100%; text-align: left; }
  .nav__item.open .nav__toggle svg { transform: rotate(180deg); }
  .mega {
    position: static; transform: none; width: auto; grid-template-columns: 1fr; gap: 0;
    background: rgba(255,255,255,.04); border-radius: 12px; padding: 0; box-shadow: none;
    opacity: 1; visibility: visible; display: none; margin: 6px 0;
  }
  .mega::before { display: none; }
  .has-mega:hover .mega { transform: none; }
  .nav__item.open .mega { display: grid; padding: 8px; }
  .mega__title { color: #ff9a5c; margin: 10px 8px 4px; }
  .mega__link:hover { background: rgba(255,255,255,.06); }
  .mega__link strong { color: #fff; }
  .mega__link small { display: none; }
  .mega__ic { background: #fff; width: 26px; height: 26px; }

  .page-hero { text-align: center; padding: calc(var(--header-h) + 34px) 0 56px; }
  .page-hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .page-hero__media { order: -1; }
  .page-hero__disc { width: 150px; }
  .crumbs { justify-content: center; }
  .page-hero .hero__actions { justify-content: center; }
  .page-hero .lead { margin-inline: auto; }
  .features { grid-template-columns: 1fr 1fr; }
  .lists { grid-template-columns: 1fr; }
  .inquiry { grid-template-columns: 1fr; gap: 28px; }
  .apps { grid-template-columns: repeat(2, 1fr); }
  .plans--3 { grid-template-columns: repeat(2, 1fr); }
  .cta .btn-row { justify-content: center; }
  .section { padding: 72px 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .container { padding: 0 16px; }
  .hide-sm { display: none; }
  .brand img { width: 42px; height: 42px; }
  .brand__text strong { font-size: .95rem; }
  .section { padding: 60px 0; }
  .section__head { margin-bottom: 36px; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero__stats li { min-width: 0; padding: 10px 8px; }
  .hero__stats strong { font-size: 1.05rem; }
  .hero__stats span { font-size: .72rem; }
  .float-card { font-size: .75rem; padding: 8px 10px; }
  .float-card--a { left: -4px; }
  .float-card--b { right: -4px; }

  .hl-card { flex-direction: column; padding: 22px; }
  .hl-card img { width: 72px; height: 72px; }

  .what { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .why__item { padding: 22px 12px; }
  .why__item:last-child { grid-column: 1 / -1; }
  .why__icon { width: 70px; height: 70px; }
  .why__icon img { width: 42px; height: 42px; }
  .why__item p { font-size: .92rem; }

  .tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px 28px; padding: 0 16px 6px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .products { grid-template-columns: 1fr; gap: 10px; }

  .clients { padding: 14px; }

  .page-hero .hero__actions { flex-direction: column; }
  .page-hero .hero__actions .btn { width: 100%; }
  .intro-card { padding: 22px; gap: 14px; }
  .plans, .plans--4, .plans--3 { grid-template-columns: 1fr; }
  .plan-group--next { margin-top: 56px; }
  .when, .when--3 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .when__item { padding: 20px 16px; }
  .when__num { font-size: 1.6rem; }
  .when__item p { font-size: .95rem; }
  .features { grid-template-columns: 1fr; gap: 12px; }
  .feature { padding: 18px; }
  .list-card { padding: 22px; }
  .lists--single .checklist--cols { columns: 1; }
  .apps { grid-template-columns: 1fr 1fr; gap: 10px; }
  .app { padding: 12px 14px; }
  .notes { padding: 20px; }
  .form { padding: 20px; }
  .form__grid { grid-template-columns: 1fr; }
  .stats strong { font-size: 1.15rem; }
  .contact__cards { grid-template-columns: 1fr; }
  .contact__map { min-height: 320px; }
  .btn-row .btn { flex: 1 1 auto; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }

  .fab {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95;
  }
  .fab__btn { height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); }
  .fab__btn svg { width: 24px; height: 24px; }
  .fab__btn--call { background: var(--orange); }
  .fab__btn--call::after { content: "โทรเลย"; }
  .fab__btn--line { background: var(--green-line); }
  .fab__btn--line::after { content: "LINE"; }
  .fab__btn { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-head); font-weight: 500; }
  .to-top { bottom: 76px; right: 14px; width: 42px; height: 42px; }
}
