/* APEX Partner Tool Co., Ltd. — homepage
   Static, dependency-free. Light / premium, navy/steel-blue accent (standard 2026-09-25).
   Accent tokens keep the historic --gold* names but now hold the blue palette
   (from the capability-onepager design); gold logo is retained. Previous gold
   version backed up as styles-gold.css.backup. */

:root {
  --bg: #ffffff;
  --bg-2: #f4f7fb;        /* cool off-white */
  --char: #15171c;        /* charcoal (footer / overlays) */
  --char-2: #1d2027;
  --ink: #17181c;
  --ink-2: #53565e;
  --muted: #8b8d95;
  --line: #e2e6ec;
  --line-2: #cfd6e0;
  --gold: #1c4f86;        /* primary blue accent (white text 8.3:1 on solid) */
  --gold-deep: #0b2a52;   /* navy-deep — hover / stat numbers */
  --gold-soft: #eaf1f8;   /* navy-soft — hero glow */
  --good: #2e9e6b;
  --radius: 14px;
  --maxw: 1140px;
  --shadow: 0 1px 2px rgba(20,22,28,.05), 0 14px 40px rgba(20,22,28,.08);
  --shadow-sm: 0 1px 2px rgba(20,22,28,.05), 0 6px 18px rgba(20,22,28,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.th { font-family: "Noto Sans Thai", var(--font); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.section-title { font-size: clamp(27px, 4vw, 40px); font-weight: 800; margin-top: 10px; }
.section-sub { color: var(--ink-2); font-family: "Noto Sans Thai", var(--font); margin-top: 8px; }
section { padding: clamp(58px, 9vw, 108px) 0; }
section.alt { background: var(--bg-2); }

/* ---- Header ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wordmark b { font-size: 19px; font-weight: 800; letter-spacing: .06em; color: var(--ink); }
.brand .wordmark small { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.lang-toggle {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold-deep); }
.nav-links a { color: var(--ink-2); font-size: 14px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-block; font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 999px;
  background: var(--gold); color: #fff; border: 0; cursor: pointer;
  transition: transform .12s, background .15s;
}
.btn:hover { background: var(--gold-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
/* nav CTA: .nav-links a color rule would otherwise win over .btn — force white text */
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 26px; cursor: pointer; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(900px 460px at 88% -8%, var(--gold-soft), transparent 60%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 62px); font-weight: 900; }
.hero h1 .accent { color: var(--gold); }
.hero .th-line { font-family: "Noto Sans Thai", var(--font); color: var(--ink-2); font-size: 17px; margin-top: 10px; }
.hero .lead { color: var(--ink-2); font-size: clamp(16px, 2vw, 19px); max-width: 52ch; margin-top: 20px; }
.hero-sub { font-family: var(--mono); font-weight: 600; letter-spacing: .04em; color: var(--gold-deep); font-size: 15px; margin-top: 14px; }
.hero-usp { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; max-width: 54ch; }
.hero-usp li { position: relative; padding-left: 32px; line-height: 1.5; color: var(--ink-2); font-size: clamp(15px, 1.8vw, 17px); }
.hero-usp li::before { content: "✓"; position: absolute; left: 0; top: .12em; width: 21px; height: 21px;
  border-radius: 50%; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; }
.hero-usp b { color: var(--gold-deep); font-weight: 700; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.stat .n { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--gold-deep); }
.stat .l { font-size: 12px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); aspect-ratio: 3/4; object-fit: cover; background: var(--bg-2);
}
.hero-badge {
  position: absolute; left: -14px; bottom: -14px;
  background: var(--char); color: #fff; border-radius: 12px;
  padding: 14px 18px; box-shadow: var(--shadow); font-size: 13px;
}
.hero-badge b { font-family: var(--mono); color: var(--gold); font-size: 18px; display: block; }

/* ---- Products ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 3/2; overflow: hidden; background: var(--bg-2); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 22px 24px 26px; }
.card .num { font-family: var(--mono); font-size: 12.5px; color: var(--gold); }
.card h3 { font-size: 20px; font-weight: 700; margin-top: 8px; }
.card .th { color: var(--gold-deep); font-size: 14.5px; margin-top: 4px; }
.card p { color: var(--ink-2); font-size: 14.5px; margin-top: 12px; }
.card-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.card-list li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.card-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---- Capabilities ---- */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
.cap-panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.cap-panel h3 { font-size: 18px; margin-bottom: 8px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.spec-table td { padding: 13px 0; border-top: 1px solid var(--line); font-size: 14.5px; vertical-align: top; }
.spec-table tr:first-child td { border-top: 0; }
.spec-table td.k { color: var(--ink-2); width: 48%; }
.spec-table td.v { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.machine-hero { display: flex; align-items: baseline; gap: 14px; }
.machine-hero .big { font-family: var(--mono); font-size: 56px; font-weight: 700; color: var(--gold); line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip { font-size: 13px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; background: var(--bg); }

/* ---- Factory split ---- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; margin-top: 44px; }
.split img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; }
.split .lead { color: var(--ink-2); font-size: 16px; }
.factory-banner { display: block; width: 100%; height: auto; margin-top: 36px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.factory-usp { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.factory-usp li { position: relative; padding: 22px 22px 22px 56px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.factory-usp li::before { content: "✓"; position: absolute; left: 20px; top: 23px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.factory-usp b { display: block; margin-bottom: 6px; color: var(--gold-deep); font-size: 16px; font-weight: 700; }

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.06); }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
.contact-panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.contact-item { display: flex; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.contact-item:first-child { border-top: 0; }
.contact-item .ico { color: var(--gold); font-size: 18px; width: 24px; text-align: center; }
.contact-item .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.contact-item .val { font-size: 15px; color: var(--ink); }
.contact-item a.val:hover { color: var(--gold-deep); }
.ph {
  border-radius: var(--radius); border: 1px dashed var(--line-2);
  background: repeating-linear-gradient(45deg, var(--bg-2) 0 12px, #efece4 12px 24px);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  font-size: 13px; font-family: var(--mono); padding: 16px; aspect-ratio: 16/12;
}
.ph .tag { color: var(--ink-2); font-weight: 600; margin-bottom: 4px; letter-spacing: .04em; }

/* ---- Footer ---- */
footer { background: var(--char); color: #c9ccd3; padding: 46px 0; }
.foot-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 16px; }
.foot-brand img { height: 68px; width: auto; }
.foot-brand b { color: #fff; font-size: 17px; letter-spacing: .05em; }

/* ---- Map ---- */
.map { width: 100%; aspect-ratio: 16/12; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.foot-meta { font-size: 12.5px; color: #8b8f98; max-width: 46ch; }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cap-grid, .contact-grid, .split, .factory-usp { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .cards, .gallery { grid-template-columns: 1fr; }
  .brand .wordmark small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .card:hover .thumb img, .gallery figure:hover img { transform: none; }
}

/* ---- Quote / contact form ---- */
.quote-form {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 34px); box-shadow: var(--shadow-sm); margin-top: 22px;
}
.quote-form h3 { font-size: 21px; font-weight: 800; }
.form-intro { color: var(--ink-2); margin: 6px 0 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 15px; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 112px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.consent-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-2); font-weight: 400; cursor: pointer; }
.consent-label input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--gold); flex: 0 0 auto; }
.quote-form .btn { margin-top: 22px; border: 0; font-size: 15px; padding: 12px 28px; }
.form-status { margin-top: 14px; font-size: 14px; font-weight: 600; min-height: 20px; font-family: "Noto Sans Thai", var(--font); }
.form-status.ok  { color: var(--good); }
.form-status.err { color: #c0392b; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- Work slider ---- */
.slider { position: relative; margin-top: 44px; }
.slider-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 18px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.slider-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--radius); }
.slider-track::-webkit-scrollbar { height: 8px; }
.slider-track::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.slider-track::-webkit-scrollbar-track { background: transparent; }
.slide {
  flex: 0 0 auto; width: min(80vw, 400px); scroll-snap-align: center; margin: 0;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); background: var(--bg-2);
}
.slide img { width: 100%; height: 300px; object-fit: cover; display: block; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px); color: var(--ink);
  font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); z-index: 2; transition: background .15s, border-color .15s, color .15s;
}
.slider-btn:hover { border-color: var(--gold); color: var(--gold-deep); }
.slider-btn.prev { left: 6px; }
.slider-btn.next { right: 6px; }
@media (max-width: 680px) {
  .slider-btn { display: none; }
  .slide { width: 84vw; }
  .slide img { height: 230px; }
}

/* ---- Floating chat buttons (LINE + WhatsApp) ---- */
.chat-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.chat-btn { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); transition: transform .14s ease, box-shadow .14s ease; }
.chat-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.chat-btn svg { width: 30px; height: 30px; }
.chat-btn.line { background: #06C755; }
.chat-btn.wa { background: #25D366; }
.chat-tip { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: #15171c; color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .15s ease; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.chat-btn:hover .chat-tip { opacity: 1; }
@media (max-width: 680px) { .chat-fab { right: 14px; bottom: 14px; } .chat-btn { width: 50px; height: 50px; } .chat-tip { display: none; } }
