/* J&A Global Research Consulting — แลนดิ้งเพจตามแบบที่ลูกค้าเลือก (กรมท่า #21265B + ขาว, ฟอนต์ Inter ตามบรีฟ) */
:root {
  --navy: #21265B;
  --navy-2: #2b3170;
  --navy-deep: #181c47;
  --ink: #1c1f3a;
  --muted: #5b6078;
  --line: #e3e5ee;
  --paper: #ffffff;
  --mist: #f3f4f8;
  --wrap: 1200px;
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: Inter, "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 100; background: #fff; padding: 12px 16px; min-height: 44px; transform: translateY(-200%); }
.skip:focus { transform: none; }
/* พื้นที่กดอย่างน้อย 44px ทุกลิงก์ */
.brand, .foot-nav a, .foot-contact a, .contact-list a { min-height: 44px; display: inline-flex; align-items: center; }
.foot-nav a { min-width: 44px; justify-content: center; }
.mails { display: grid; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 40px; height: 40px; stroke-width: 1.5; }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius);
  font: 600 15px/1 Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #e9ebf5; }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* หัวเว็บ — ไม่ใช้ backdrop-filter/transform เพื่อให้เมนูมือถือเต็มจอ */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 62px; height: auto; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.15; padding-left: 12px; border-left: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink); }
.nav a:not(.btn):hover { color: var(--navy); text-decoration: underline; text-underline-offset: 6px; }
.nav .nav-cta { color: #fff; padding: 0 30px; min-height: 44px; }
.menu-btn { display: none; }

/* แบนเนอร์ + วิดีโอ */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 15% 20%, rgba(255, 255, 255, .07), transparent 60%),
    radial-gradient(1.2px 1.2px at 20% 30%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, .4), transparent),
    radial-gradient(1.4px 1.4px at 8% 80%, rgba(255, 255, 255, .45), transparent),
    linear-gradient(120deg, var(--navy-deep), var(--navy) 55%, var(--navy-2));
}
.hero-in { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-block: 64px; }
.hero h1 { font-size: clamp(36px, 4.6vw, 62px); font-weight: 800; letter-spacing: -0.025em; max-width: 13ch; }
.hero .lead { margin-top: 20px; font-size: clamp(17px, 1.4vw, 20px); color: rgba(255, 255, 255, .86); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-media { position: relative; justify-self: end; width: min(100%, 440px); }
.hero-video { width: 100%; height: auto; aspect-ratio: 1080 / 1350; object-fit: cover; background: var(--navy-deep); }
.video-toggle {
  position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .8); background: rgba(24, 28, 71, .55); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.video-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.video-toggle .i-play, .video-toggle[data-state="paused"] .i-pause { display: none; }
.video-toggle[data-state="paused"] .i-play { display: block; }

/* สำนักงาน */
.offices { border-bottom: 1px solid var(--line); }
.offices-in { display: grid; grid-template-columns: 1fr 1fr; }
.office { display: flex; gap: 16px; align-items: flex-start; padding: 26px 32px; color: var(--navy); }
.office + .office { border-left: 1px solid var(--line); }
.office .ico { width: 28px; height: 28px; margin-top: 2px; }
.office h2 { font-size: 18px; font-weight: 700; }
.office p { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* โลโก้ลูกค้า เลื่อนต่อเนื่อง */
.clients { padding: 44px 0 40px; background: #fff; }
.clients-title { text-align: center; font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 26px; }
.marquee {
  overflow: hidden; padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; align-items: center; width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 48s linear infinite; }
.marquee[data-dir="right"] .marquee-track { animation-direction: reverse; animation-duration: 54s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee li { flex: none; display: flex; align-items: center; height: 56px; margin-right: 64px; }
.marquee img { width: auto; height: auto; max-height: 44px; max-width: 150px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* หัวข้อส่วน */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 40px; align-items: end; margin-bottom: 40px; }
.sec-title { font-size: clamp(30px, 3.2vw, 42px); font-weight: 800; color: var(--navy); position: relative; padding-bottom: 16px; }
.sec-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--navy); }
.sec-head p { color: var(--muted); font-size: 17px; max-width: 58ch; }
.rule { display: block; width: 56px; height: 3px; background: #fff; margin: 18px 0; }
.rule-navy { background: var(--navy); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .8); margin-bottom: 10px; }

/* บริการ */
.services { padding: 72px 0; border-top: 1px solid var(--line); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service { padding: 6px 28px 8px; color: var(--navy); }
.service:first-child { padding-left: 0; }
.service + .service { border-left: 1px solid var(--line); }
.service h3 { font-size: 19px; font-weight: 700; margin: 18px 0 10px; }
.service p { color: var(--muted); font-size: 15px; }

/* เครือข่ายทั่วโลก */
.network { background: var(--navy); color: #fff; padding: 64px 0; overflow: hidden; }
.network-in { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 40px; align-items: center; }
.network h2 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; }
.network-copy > p:last-child { color: rgba(255, 255, 255, .84); max-width: 46ch; }
.map-svg { width: 100%; height: auto; }
.regions { list-style: none; margin: 0; padding: 0 0 0 32px; border-left: 1px solid rgba(255, 255, 255, .3); display: grid; gap: 10px; font-weight: 600; font-size: 17px; }

/* อุตสาหกรรม */
.industries { padding: 80px 0 40px; }
.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ind {
  position: relative; padding: 28px 26px; color: #fff; min-height: 240px; aspect-ratio: 3 / 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #2b2b2e; isolation: isolate;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); overflow: hidden;
}
.ind-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: -2; }
.ind::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 20, 24, .82) 0%, rgba(20, 20, 24, .55) 45%, rgba(20, 20, 24, 0) 75%), linear-gradient(0deg, rgba(20, 20, 24, .55), rgba(20, 20, 24, 0) 60%); }
.ind:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(33, 38, 91, .22); }
.ind h3 { font-size: 26px; font-weight: 700; line-height: 1.15; margin: 0 0 8px; max-width: 62%; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.ind p { color: rgba(255, 255, 255, .86); font-size: 14.5px; max-width: 64%; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }

/* ขั้นตอน */
.process { padding: 56px 0 80px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; position: relative; text-align: center; }
.steps::before { content: ""; position: absolute; top: 18px; left: 10%; right: 10%; height: 2px; background: var(--navy); }
.steps li { position: relative; }
.num { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 16px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; box-shadow: 0 0 0 6px #fff; }
.steps h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15px; }

/* ผลงานภาคสนาม */
.work { background: var(--mist); padding: 80px 0; }
.work-in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.work-copy > p { color: var(--muted); font-size: 17px; margin-top: 22px; max-width: 46ch; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; font-weight: 500; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 10px; border-left: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(-45deg) scale(.8); }
.work-photo { margin: 0; justify-self: end; width: min(100%, 480px); }
.work-photo img { width: 100%; height: auto; }

/* วิดีโอแนะนำ + ความน่าเชื่อถือ */
.intro { padding: 72px 0; }
.trust { max-width: 560px; }
.trust p { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 800px; margin: 30px 0 0; border-block: 1px solid var(--line); }
.stat { padding: 22px 28px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat dt { font-size: clamp(36px, 4vw, 48px); font-weight: 800; line-height: 1.05; color: var(--navy); letter-spacing: -.01em; }
.stat dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.trust-strip { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust-strip li { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--mist); }
.trust-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trust-strip img.pos-low { object-position: 50% 72%; }
.trust-strip span { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }
.trust h2 { font-size: clamp(28px, 2.8vw, 36px); font-weight: 800; color: var(--navy); margin-bottom: 14px; }

/* ติดต่อ */
.contact { background: linear-gradient(120deg, var(--navy-deep), var(--navy)); color: #fff; padding: 72px 0; }
.contact-in { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; }
.contact-copy > p { color: rgba(255, 255, 255, .84); max-width: 44ch; }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 2px; font-size: 15px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255, 255, 255, .9); }
.contact-list .ico { margin-top: 11px; }
.contact-list li > span:not(.mails) { padding-top: 10px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.line-ico { stroke: none; }
.inquiry { display: grid; gap: 14px; }
.inquiry .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inquiry label { display: grid; gap: 6px; }
.inquiry label span { font-size: 14px; color: rgba(255, 255, 255, .85); }
.inquiry input, .inquiry textarea {
  width: 100%; font: 16px/1.4 Inter, system-ui, sans-serif; color: var(--ink); background: #fff;
  border: 1.5px solid transparent; border-radius: var(--radius); padding: 11px 12px; min-height: 46px;
}
.inquiry textarea { resize: vertical; min-height: 110px; }
.inquiry input:focus, .inquiry textarea:focus { outline: none; border-color: #aab0e0; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.inquiry [aria-invalid="true"] { border-color: #f2b8b8; }
.inquiry .btn { justify-self: start; min-width: 180px; }
.form-note { font-size: 14px; color: rgba(255, 255, 255, .7); }

/* ท้ายเว็บ */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 18px; }
.footer-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand-foot img { width: 52px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.foot-nav a, .foot-contact a { text-decoration: none; }
.foot-nav a:hover, .foot-contact a:hover { color: var(--navy); text-decoration: underline; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 500; }
.foot-contact .ico { width: 18px; height: 18px; }
.copy { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }

.float-cta { display: none; }

/* ปรากฏตอนเลื่อนถึง */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- แท็บเล็ต ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
  .nav a { font-size: 14px; }
  .network-in { grid-template-columns: 1fr 1fr; }
  .regions { grid-column: 1 / -1; padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .3); grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .service:nth-child(3) { padding-left: 0; border-left: 0; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- มือถือ: เมนูเต็มจอ ---------- */
@media (max-width: 900px) {
  .menu-btn {
    display: grid; gap: 5px; place-content: center; width: 46px; height: 46px; padding: 0;
    background: none; border: 0; cursor: pointer; position: relative; z-index: 61;
  }
  .menu-btn span { display: block; width: 24px; height: 2px; background: var(--navy); transition: transform .25s var(--ease), opacity .2s; }
  .nav-open .menu-btn span { background: #fff; }
  .nav-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; z-index: 60; background: var(--navy); flex-direction: column; justify-content: center; gap: 6px;
    opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav a { color: #fff; font-size: 22px; font-weight: 600; padding: 10px 16px; }
  .nav .nav-cta { margin-top: 16px; background: #fff; color: var(--navy); font-size: 17px; }
  .nav-open { overflow: hidden; }

  .hero-in { grid-template-columns: 1fr; gap: 32px; padding-block: 44px 0; }
  .hero-media { justify-self: stretch; width: auto; margin-inline: -24px; }
  .hero-video { max-height: 70vh; }
  .offices-in { grid-template-columns: 1fr; }
  .office { padding: 20px 0; }
  .office + .office { border-left: 0; border-top: 1px solid var(--line); }
  .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 30px; }
  .network-in { grid-template-columns: 1fr; }
  .regions { grid-template-columns: repeat(2, auto); }
  .ind-grid { grid-template-columns: 1fr; gap: 12px; }
  .ind { min-height: 0; }
  .steps { grid-template-columns: 1fr; text-align: left; gap: 22px; }
  .steps::before { top: 10px; bottom: 10px; left: 18px; right: auto; width: 2px; height: auto; }
  .steps li { padding-left: 58px; }
  .num { position: absolute; left: 0; top: -4px; margin: 0; }
  .work-in, .contact-in { grid-template-columns: 1fr; gap: 36px; }
  .work-photo { justify-self: stretch; width: 100%; }
  .footer-in { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  .hero-media { margin-inline: -16px; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .service, .service:first-child { padding: 0; border: 0 !important; }
  .service h3 { font-size: 17px; margin-top: 12px; }
  .service p { font-size: 14px; }
  .stat { padding: 16px 10px; }
  .stat dt { font-size: 30px; }
  .stat dd { font-size: 14px; }
  .trust-strip { gap: 8px; margin-top: 36px; }
  .trust-strip span { left: 6px; right: 6px; bottom: 6px; width: fit-content; padding: 4px 8px; font-size: 14px; }
  .inquiry .row { grid-template-columns: 1fr; }
  .inquiry .btn { justify-self: stretch; }
  .marquee li { margin-right: 40px; }
  .marquee img { max-height: 34px; max-width: 120px; }
  .brand-name { font-size: 14px; }
  .brand img { width: 52px; }
  /* ปุ่มลอยล่างจอ: ไลน์กับโทร */
  .float-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40;
  }
  .float-cta a { display: grid; place-items: center; height: 50px; border-radius: var(--radius); font-weight: 700; text-decoration: none; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
  .fc-line { background: #06C755; }
  .fc-call { background: var(--navy); }
  .site-footer { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
