@charset "UTF-8";
/* ==========================================================================
   General Trust — Navy & Amber
   Showcase / Portfolio stylesheet (ตัวอย่างกลาง ไม่ใช่งานลูกค้ารายใด)
   อ้างอิง: design-spec.md v1.0 — ภาคผนวก C (Design Token)
   โครงสร้าง:
     01 Tokens           07 Header / Nav        13 CTA band
     02 Reset / Base     08 Hero / Page hero    14 Footer
     03 Typography       09 Placeholder (SVG)   15 Forms
     04 Layout           10 Cards               16 Accordion / FAQ
     05 Buttons          11 Filter bar          17 Lightbox
     06 Demo banner      12 Content blocks      18 Motion / Utilities
   ========================================================================== */

/* ==========================================================================
   01 · TOKENS
   ========================================================================== */
:root {
  /* Brand */
  --brand-primary:       #123C63;
  --brand-primary-hover: #0D2C49;
  --brand-primary-tint:  #E7EEF6;
  --brand-secondary:     #1B5183;
  --brand-accent:        #B45309;
  --brand-accent-hover:  #96430A;
  --on-accent:           #FFFFFF;

  /* Surface & Text */
  --bg:            #FFFFFF;
  --bg-alt:        #F5F7FA;
  --surface:       #FFFFFF;
  --text:          #14212E;
  --text-muted:    #52627A;
  --border:        #E2E8F0;
  --border-hover:  #C9D6E4;
  --border-strong: #64748B;
  --success:       #15803D;
  --error:         #B91C1C;
  --footer-bg:     #0E2C47;
  --footer-text-muted: #B3C4D6;
  --line-green:    #06C755;

  /* Type */
  --font-heading: 'Anuphan', 'IBM Plex Sans Thai', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'IBM Plex Sans Thai', 'Noto Sans Thai', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: 20px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 999px;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 60px;

  /* Spacing scale (ฐาน 4px) */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-32: 128px;

  /* Elevation (light mode เท่านั้น) */
  --shadow-sm: 0 1px 2px rgba(18, 60, 99, 0.06);
  --shadow-md: 0 4px 16px rgba(18, 60, 99, 0.08);
  --shadow-lg: 0 12px 32px rgba(18, 60, 99, 0.12);

  /* Placeholder SVG (ปรับตามโหมดสี) */
  --ph-bg: #E7EEF6;
  --ph-ink: rgba(18, 60, 99, 0.55);
  --ph-line: rgba(18, 60, 99, 0.18);
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --header-h: 64px; }
}
@media (min-width: 1024px) {
  :root { --header-h: 72px; }
}

/* Dark mode — ตาม prefers-color-scheme (ไม่มีปุ่มสลับตามที่คิมเคาะ)
   หมายเหตุ: dark mode ห้ามใช้เงา → ใช้เส้นกรอบแทน */
@media (prefers-color-scheme: dark) {
  :root {
    --brand-primary:       #7FB3E0;
    --brand-primary-hover: #A3C8EA;
    --brand-primary-tint:  #1A2C42;
    --brand-secondary:     #7FB3E0;
    --brand-accent:        #F0A340;
    --brand-accent-hover:  #F5B563;
    --on-accent:           #0B1420;

    --bg:            #0B1420;
    --bg-alt:        #131F2E;
    --surface:       #131F2E;
    --text:          #E8EDF4;
    --text-muted:    #9DACC0;
    --border:        #24334A;
    --border-hover:  #35486A;
    --border-strong: #7FB3E0;
    --success:       #4ADE80;
    --error:         #F87171;
    --footer-bg:     #08101A;
    --footer-text-muted: #9DACC0;

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;

    --ph-bg: #1A2C42;
    --ph-ink: rgba(127, 179, 224, 0.7);
    --ph-line: rgba(127, 179, 224, 0.25);
  }
}

/* ==========================================================================
   02 · RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;          /* 16px — ไทยห้ามต่ำกว่านี้ในเนื้อความ */
  font-weight: 400;
  line-height: 1.75;        /* ไทยมีวรรณยุกต์ 2 ชั้น */
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--brand-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-10) 0; }

:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--brand-primary-tint); color: var(--brand-primary); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -80px;
  z-index: 200;
  background: var(--brand-primary);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--sp-4); text-decoration: none; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   03 · TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--brand-primary);
}
@media (prefers-color-scheme: dark) {
  h1, h2, h3, h4 { color: var(--text); }
}

p { margin: 0 0 var(--sp-4); max-width: 70ch; }
p:last-child { margin-bottom: 0; }

.t-display, h1.t-display { font-size: 2.125rem; line-height: 1.25; letter-spacing: -0.01em; }
h1, .t-h1 { font-size: 1.875rem; line-height: 1.28; letter-spacing: -0.01em; }
h2, .t-h2 { font-size: 1.625rem; line-height: 1.32; letter-spacing: -0.005em; }
h3, .t-h3 { font-size: 1.3125rem; line-height: 1.4; }
h4, .t-h4 { font-size: 1.125rem; line-height: 1.45; }

@media (min-width: 1024px) {
  .t-display, h1.t-display { font-size: 3.5rem; }
  h1, .t-h1 { font-size: 2.75rem; }
  h2, .t-h2 { font-size: 2.25rem; }
  h3, .t-h3 { font-size: 1.625rem; }
  h4, .t-h4 { font-size: 1.25rem; }
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 52ch;
}
@media (min-width: 1024px) { .lead { font-size: 1.125rem; } }

.t-small   { font-size: 0.875rem; line-height: 1.7; }
.t-caption { font-size: 0.8125rem; line-height: 1.6; letter-spacing: 0.01em; }
.t-muted   { color: var(--text-muted); }
.t-num     { font-variant-numeric: tabular-nums; }

/* Eyebrow — ห้าม uppercase กับไทย ใช้ letter-spacing + weight แทน */
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin: 0 0 var(--sp-3);
}
@media (min-width: 1024px) { .eyebrow { font-size: 0.8125rem; } }

.section-head { max-width: 640px; margin-bottom: var(--sp-10); }
.section-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.is-center .lead { margin-left: auto; margin-right: auto; }
.section-head h2 + .lead { margin-top: var(--sp-4); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-secondary);
  min-height: 44px;
}
.link-arrow svg { transition: transform var(--transition); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ==========================================================================
   04 · LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(880px + var(--gutter) * 2); }

.section { padding-block: 56px; }
@media (min-width: 768px)  { .section { padding-block: 72px; } }
@media (min-width: 1024px) { .section { padding-block: 96px; } }
.section--tight { padding-block: 40px; }
.section--alt { background: var(--bg-alt); }
.section--bordered { border-top: 1px solid var(--border); }

.grid { display: grid; gap: var(--sp-6); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
}

/* 2 คอลัมน์แบบ 55/45 และ 58/42 */
.split { display: grid; gap: var(--sp-8); align-items: center; }
@media (min-width: 1024px) {
  .split { gap: var(--sp-16); grid-template-columns: 55fr 45fr; }
  .split--58 { grid-template-columns: 58fr 42fr; align-items: start; }
  .split--70 { grid-template-columns: 70fr 30fr; align-items: start; gap: var(--sp-12); }
  .split--reverse > *:first-child { order: 2; }
}

.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mt-10 { margin-top: var(--sp-10); }

/* ==========================================================================
   05 · BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn svg { flex: none; }

.btn--lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }

.btn--primary { background: var(--brand-accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--brand-accent-hover); }
.btn--primary:focus-visible { outline-color: var(--brand-primary); outline-offset: 3px; }

.btn--secondary {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn--secondary:hover { background: var(--brand-primary-tint); }

.btn--ghost { background: transparent; color: var(--brand-secondary); padding-inline: 4px; }
.btn--ghost:hover { background: transparent; box-shadow: none; text-decoration: underline; }

.btn--on-navy { background: #FFFFFF; color: #123C63; }
.btn--on-navy:hover { background: #E7EEF6; }
.btn--on-navy-ghost {
  background: transparent;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.btn--on-navy-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #FFFFFF; }
.btn--on-navy:focus-visible, .btn--on-navy-ghost:focus-visible { outline-color: #FFFFFF; }

.btn--line { background: var(--line-green); color: #FFFFFF; }
.btn--line:hover { background: #05B24C; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.btn-row.is-center { justify-content: center; }
@media (max-width: 639px) {
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
}

/* ==========================================================================
   06 · DEMO BANNER (ตัวอย่างงานออกแบบ)
   ========================================================================== */
.demo-bar {
  position: relative;
  z-index: 120;
  background: var(--brand-primary);
  color: #FFFFFF;
  font-size: 0.8125rem;
  line-height: 1.6;
}
@media (prefers-color-scheme: dark) {
  .demo-bar { background: #1A2C42; color: #E8EDF4; }
}
.demo-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 40px;
  padding-block: 6px;
  text-align: center;
}
.demo-bar__text { display: inline-flex; align-items: center; gap: var(--sp-2); }
.demo-bar__close {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  border: 0;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}
.demo-bar__close:hover { background: rgba(255, 255, 255, 0.24); }
.demo-bar[hidden] { display: none; }

/* ==========================================================================
   07 · HEADER / NAV / DRAWER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(11, 20, 32, 0.92); }
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-primary); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
@media (min-width: 1024px) { .brand__mark { width: 38px; height: 38px; } }
.brand__name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  color: var(--brand-primary);
}
@media (prefers-color-scheme: dark) { .brand__name { color: var(--text); } }
.brand__sub {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.nav { display: none; }
@media (min-width: 1024px) {
  .nav { display: flex; align-items: center; gap: var(--sp-8); }
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}
.nav__link:hover { color: var(--brand-primary); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--brand-primary); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}

.header__actions { display: flex; align-items: center; gap: var(--sp-2); }
.header__cta { display: none; }
@media (min-width: 1024px) { .header__cta { display: inline-flex; } }

.hamburger {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand-primary);
}
.hamburger:hover { background: var(--brand-primary-tint); }
@media (min-width: 1024px) { .hamburger { display: none; } }

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 32, 0.55);
  opacity: 0;
  transition: opacity 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--border);
  padding: var(--sp-5);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); }
.drawer__close {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.drawer__nav { display: flex; flex-direction: column; gap: var(--sp-2); }
.drawer__nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
}
.drawer__nav a:hover { background: var(--bg-alt); text-decoration: none; }
.drawer__nav a[aria-current="page"] { color: var(--brand-primary); font-weight: 600; background: var(--brand-primary-tint); }
.drawer__foot { margin-top: auto; padding-top: var(--sp-8); display: grid; gap: var(--sp-3); }

/* ==========================================================================
   08 · HERO / PAGE HERO
   ========================================================================== */
.hero { padding-block: 48px 56px; }
@media (min-width: 1024px) {
  .hero { padding-block: 80px 96px; }
  .hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-6); align-items: center; min-height: 460px; }
  .hero__copy { grid-column: 1 / span 6; }
  .hero__media { grid-column: 7 / span 6; }
}
.hero__copy h1 { max-width: 18ch; margin-bottom: var(--sp-5); }
.hero__copy .lead { margin-bottom: var(--sp-8); }
.hero__media { margin-top: var(--sp-8); }
@media (min-width: 1024px) { .hero__media { margin-top: 0; } }
.hero__media .ph { box-shadow: var(--shadow-lg); }

.trust-strip {
  margin-top: var(--sp-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  overflow: hidden;
}
.trust-strip__item { padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border); }
.trust-strip__item:last-child { border-bottom: 0; }
@media (min-width: 768px) {
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
  .trust-strip__item { border-bottom: 0; border-right: 1px solid var(--border); text-align: center; }
  .trust-strip__item:last-child { border-right: 0; }
}
.trust-strip__num {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}
.trust-strip__label { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

/* Page hero (หน้าใน) */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  min-height: 180px;
  padding-block: var(--sp-8);
}
@media (min-width: 1024px) { .page-hero { min-height: 240px; } }
.page-hero h1 { margin-bottom: var(--sp-3); }
.page-hero p { color: var(--text-muted); max-width: 62ch; }

.breadcrumb { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: var(--sp-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand-primary); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ==========================================================================
   09 · PLACEHOLDER (inline SVG แทนรูปจริง)
   ========================================================================== */
.ph {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--ph-bg);
  color: var(--ph-ink);
}
.ph > svg { width: 100%; height: 100%; display: block; }
.ph--3x2  { aspect-ratio: 3 / 2; }
.ph--4x3  { aspect-ratio: 4 / 3; }
.ph--1x1  { aspect-ratio: 1 / 1; }
.ph--4x5  { aspect-ratio: 4 / 5; }
.ph--16x6 { aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .ph--16x6 { aspect-ratio: 16 / 6; } }
.ph--flat { border-radius: 0; }
.ph--round { border-radius: var(--radius-full); }

/* ป้ายบอกว่าเป็นภาพแทนที่ (ลบออกได้เมื่อใส่รูปจริง) */
.ph__tag {
  position: absolute;
  left: 10px; bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(11, 20, 32, 0.62);
  color: #FFFFFF;
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* วงกลมอักษรย่อ (ใช้แทนรูปโปรไฟล์ผู้รีวิว) */
.avatar {
  width: 48px; height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--brand-primary-tint);
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
}

/* ==========================================================================
   10 · CARDS
   ========================================================================== */
/* --- การ์ดสินค้า --- */
.product-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 420px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 640px) { .product-grid { gap: var(--sp-6); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.card__media { position: relative; overflow: hidden; background: var(--bg-alt); }
.card__media .ph { border-radius: 0; transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1); }
.card:hover .card__media .ph { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-5); }
.card__title { margin: 0 0 6px; color: var(--text); }
.card__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.card__body > .card__desc { margin-bottom: var(--sp-4); }
.card__sku { font-size: 0.8125rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-secondary);
}
.card__link:hover { text-decoration: underline; }

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-tint);
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

/* การ์ดกระชับ 420–639px: ซ่อนคำอธิบาย ลด padding */
@media (max-width: 639px) and (min-width: 420px) {
  .card__body { padding: 14px; }
  .card__title { font-size: 1rem; }
  .card__desc { display: none; }
}

/* --- การ์ดหมวดหมู่ (รูป 1:1 + ข้อความทับ) --- */
.cat-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #FFFFFF;
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-card .ph { border-radius: 0; }
.cat-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-4);
  background: linear-gradient(to top, rgba(11, 20, 32, 0.78), transparent 60%);
}
.cat-card__title { font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem; color: #FFFFFF; line-height: 1.4; }
.cat-card__count { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.82); }

/* --- การ์ดผลงาน --- */
.work-card {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  text-align: left;
  width: 100%;
  padding: 0;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-hover); text-decoration: none; }
.work-card .ph { border-radius: 0; }
.work-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--sp-5);
  text-align: center;
  background: rgba(18, 60, 99, 0.7);
  color: #FFFFFF;
  opacity: 0;
  transition: opacity var(--transition);
}
.work-card:hover .work-card__overlay,
.work-card:focus-visible .work-card__overlay { opacity: 1; }
.work-card__caption { display: block; padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.work-card__caption h3,
.work-card__name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--text);
}
.work-card__caption p,
.work-card__cat { display: block; font-size: 0.8125rem; color: var(--text-muted); margin: 4px 0 0; }

/* ==========================================================================
   11 · FILTER BAR
   ========================================================================== */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-4);
}
@media (prefers-color-scheme: dark) {
  .filter-bar { background: rgba(11, 20, 32, 0.95); }
}
.filter-bar--static { position: static; }
.filter-bar__inner { display: flex; flex-direction: column; gap: var(--sp-3); }
@media (min-width: 768px) {
  .filter-bar__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--sp-6); }
}

.pill-group {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 2px;
  /* mask ไล่จางขอบขวา บอกว่ายังเลื่อนได้ */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
}
.pill-group::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .pill-group { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
}
.pill {
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.pill:hover { background: var(--brand-primary-tint); border-color: var(--brand-primary); }
.pill[aria-pressed="true"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #FFFFFF;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .pill[aria-pressed="true"] { color: #0B1420; }
}

.filter-bar__tools { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
@media (max-width: 767px) { .filter-bar__tools { width: 100%; justify-content: space-between; } }
.select {
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352627A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.result-count { font-size: 0.875rem; color: var(--text-muted); }
.result-count strong { color: var(--text); font-variant-numeric: tabular-nums; }

.empty-state {
  display: none;
  padding: var(--sp-16) var(--sp-5);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}
.empty-state.is-visible { display: block; }
.empty-state svg { margin: 0 auto var(--sp-4); color: var(--border-strong); }
.empty-state h3 { margin-bottom: var(--sp-2); }

/* ==========================================================================
   12 · CONTENT BLOCKS
   ========================================================================== */
/* Feature 2×2 */
.feature {
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.feature__icon { color: var(--brand-accent); margin-bottom: var(--sp-4); }
.feature h3 { font-size: 1.125rem; margin-bottom: var(--sp-2); color: var(--text); }
.feature p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }

/* ขั้นตอนการทำงาน */
.steps { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps--4 { grid-template-columns: repeat(4, 1fr); } .steps--5 { grid-template-columns: repeat(5, 1fr); } }
.step { position: relative; padding-left: 56px; }
@media (min-width: 1024px) { .step { padding-left: 0; padding-top: 56px; } }
.step__num {
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { .step__num { color: #0B1420; } }
.step h3 { font-size: 1.0625rem; margin-bottom: 6px; color: var(--text); }
.step p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
/* เส้นเชื่อมแนวตั้งบนมือถือ */
.step::before {
  content: "";
  position: absolute;
  left: 19px; top: 44px; bottom: -28px;
  width: 2px;
  background: var(--border);
}
.step:last-child::before { display: none; }
@media (min-width: 1024px) {
  .step::before { left: 44px; right: -24px; top: 19px; bottom: auto; width: auto; height: 2px; }
}

/* การ์ดขั้นตอนแบบมีเลขใหญ่จาง (services) */
.step-card {
  position: relative;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.step-card__bignum {
  position: absolute;
  right: 12px; top: -6px;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 600;
  line-height: 1;
  color: var(--brand-primary);
  opacity: 0.08;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.step-card h3 { font-size: 1.0625rem; margin-bottom: var(--sp-2); color: var(--text); position: relative; }
.step-card p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; position: relative; }

/* แถบตัวเลข navy */
.stats-band { background: var(--brand-primary); color: #FFFFFF; padding-block: 56px; }
@media (prefers-color-scheme: dark) {
  .stats-band { background: var(--bg-alt); border-block: 1px solid var(--border); color: var(--text); }
}
@media (min-width: 1024px) { .stats-band { padding-block: 72px; } }
.stats-grid { display: grid; gap: var(--sp-8); grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { display: grid; gap: 6px; }
.stat__num {
  font-family: var(--font-heading);
  font-size: 2.125rem;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) { .stat__num { font-size: 3rem; } }
.stat__label { font-size: 0.9375rem; color: rgba(255, 255, 255, 0.82); }
@media (prefers-color-scheme: dark) { .stat__label { color: var(--text-muted); } }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline__item { position: relative; padding-bottom: var(--sp-8); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -32px; top: 6px;
  width: 16px; height: 16px;
  border-radius: var(--radius-full);
  background: var(--bg);
  border: 3px solid var(--brand-accent);
}
.timeline__year {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--brand-accent);
  font-variant-numeric: tabular-nums;
}
.timeline__item h3 { font-size: 1.0625rem; margin: 2px 0 6px; color: var(--text); }
.timeline__item p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
@media (min-width: 1024px) {
  .timeline { padding-left: 0; max-width: 900px; margin-inline: auto; }
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline__item { width: 50%; padding-right: var(--sp-10); text-align: right; }
  .timeline__item .timeline__dot { left: auto; right: -8px; }
  .timeline__item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: var(--sp-10);
    text-align: left;
  }
  .timeline__item:nth-child(even) .timeline__dot { left: -8px; right: auto; }
}

/* ทีมงาน */
.team-card { text-align: center; }
.team-card .ph { width: 140px; margin: 0 auto var(--sp-4); border-radius: var(--radius-full); }
@media (min-width: 1024px) { .team-card .ph { width: 160px; } }
.team-card h3 { font-size: 1.0625rem; color: var(--text); }
.team-card p { font-size: 0.875rem; color: var(--text-muted); margin: 2px 0 0; }

/* คำพูดลูกค้า */
.quote {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  height: 100%;
}
.quote__mark { color: var(--brand-accent); margin-bottom: var(--sp-3); }
.quote__text { font-size: 0.9375rem; line-height: 1.8; color: var(--text); margin-bottom: var(--sp-5); }
.quote__person { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.quote__name { font-weight: 600; font-size: 0.9375rem; color: var(--text); line-height: 1.4; }
.quote__role { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }

/* โลโก้ลูกค้า / ใบรับรอง */
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .logo-grid { grid-template-columns: repeat(5, 1fr); } }
.logo-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 3;
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--transition), opacity var(--transition);
}
.logo-slot:hover { filter: grayscale(0); opacity: 1; }
.logo-slot span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--brand-primary);
  text-align: center;
  line-height: 1.4;
}

/* zigzag บริการ */
.zigzag { display: grid; gap: var(--sp-16); }
.zigzag__row { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 1024px) {
  .zigzag__row { grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
  .zigzag__row:nth-child(even) .zigzag__media { order: 2; }
}
.zigzag h3 { margin-bottom: var(--sp-3); }
.check-list { list-style: none; display: grid; gap: 10px; margin: var(--sp-4) 0 var(--sp-5); }
.check-list li { display: flex; gap: 10px; font-size: 0.9375rem; line-height: 1.7; }
.check-list svg { flex: none; margin-top: 5px; color: var(--success); }
.check-list--no svg { color: var(--text-muted); }

/* กล่องเน้น */
.callout {
  background: var(--brand-primary-tint);
  border-radius: var(--radius-md);
  padding: var(--sp-8);
  text-align: center;
}
.callout h2, .callout h3 { color: var(--brand-primary); margin-bottom: var(--sp-3); }
@media (prefers-color-scheme: dark) { .callout h2, .callout h3 { color: var(--text); } }
.callout p { margin-inline: auto; color: var(--text-muted); }

.value-card {
  background: var(--bg-alt);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.value-card h3 { margin-bottom: var(--sp-3); }
.value-card p { color: var(--text-muted); margin: 0; }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.info-list { list-style: none; display: grid; gap: var(--sp-5); }
.info-list li { display: flex; gap: var(--sp-3); }
.info-list svg { flex: none; margin-top: 4px; color: var(--brand-secondary); }
.info-list dt, .info-list .info-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.info-list .info-value { font-size: 0.9375rem; line-height: 1.7; color: var(--text); }
.info-list a { color: var(--brand-secondary); }

.social-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.social-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--brand-primary);
  border: 1px solid var(--border);
  transition: background-color var(--transition), color var(--transition);
}
.social-btn:hover { background: var(--brand-primary-tint); }

/* แผนที่ */
.map-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-alt);
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-wrap .map-btn { position: absolute; right: 16px; bottom: 16px; }

/* ปุ่มลัดลอยบนมือถือ */
.sticky-contact {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 95;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(18, 60, 99, 0.12);
}
.sticky-contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 56px;
  font-weight: 600;
  color: #FFFFFF;
}
.sticky-contact a:hover { text-decoration: none; }
.sticky-contact__call { background: var(--brand-primary); }
.sticky-contact__line { background: var(--line-green); }
@media (prefers-color-scheme: dark) { .sticky-contact__call { color: #0B1420; } }
@media (min-width: 768px) { .sticky-contact { display: none; } }
body.has-sticky-contact { padding-bottom: 56px; }
@media (min-width: 768px) { body.has-sticky-contact { padding-bottom: 0; } }

/* บทความยาว (privacy) */
.prose h2 { font-size: 1.375rem; margin: var(--sp-10) 0 var(--sp-4); scroll-margin-top: 120px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.0625rem; margin: var(--sp-6) 0 var(--sp-2); color: var(--text); }
.prose p, .prose li { max-width: 70ch; }
.prose ul, .prose ol { margin: 0 0 var(--sp-4) 20px; display: grid; gap: 6px; }
.prose li { padding-left: 4px; }

.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc__title { font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); margin-bottom: var(--sp-3); letter-spacing: 0.04em; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 2px solid var(--border); }
.toc a {
  display: block;
  padding: 8px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.toc a:hover { color: var(--brand-primary); text-decoration: none; }
.toc a.is-active { color: var(--brand-primary); border-left-color: var(--brand-accent); font-weight: 600; }
@media (max-width: 1023px) {
  .toc { position: static; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4); margin-bottom: var(--sp-8); }
}

/* ==========================================================================
   13 · CTA BAND
   ========================================================================== */
.cta-band {
  position: relative;
  background: var(--brand-primary);
  color: #FFFFFF;
  padding-block: 56px;
  overflow: hidden;
}
@media (min-width: 1024px) { .cta-band { padding-block: 80px; } }
@media (prefers-color-scheme: dark) {
  .cta-band { background: var(--bg-alt); color: var(--text); border-block: 1px solid var(--border); }
}
.cta-band__deco { position: absolute; right: -60px; top: -80px; color: rgba(255, 255, 255, 0.05); pointer-events: none; }
.cta-band__inner { position: relative; text-align: center; display: grid; justify-items: center; gap: var(--sp-4); }
.cta-band h2 { color: #FFFFFF; max-width: 24ch; }
@media (prefers-color-scheme: dark) { .cta-band h2 { color: var(--text); } }
.cta-band p { color: rgba(255, 255, 255, 0.82); max-width: 56ch; margin: 0; }
@media (prefers-color-scheme: dark) { .cta-band p { color: var(--text-muted); } }
.cta-band .btn-row { margin-top: var(--sp-4); }
@media (prefers-color-scheme: dark) {
  .cta-band .btn--on-navy { background: var(--brand-accent); color: #0B1420; }
  .cta-band .btn--on-navy-ghost { color: var(--text); border-color: var(--border-strong); }
}

/* ==========================================================================
   14 · FOOTER
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: #FFFFFF;
  padding-top: 56px;
  padding-bottom: var(--sp-8);
}
@media (min-width: 1024px) { .site-footer { padding-top: 72px; } }
.footer-grid { display: grid; gap: var(--sp-8); }
@media (min-width: 768px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-10); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }
.footer-brand__name { font-family: var(--font-heading); font-weight: 600; font-size: 1.125rem; color: #FFFFFF; }
.footer-brand p { font-size: 0.875rem; color: var(--footer-text-muted); margin: var(--sp-3) 0 var(--sp-5); max-width: 34ch; }
.footer-col h3 { font-size: 0.875rem; font-weight: 600; color: #FFFFFF; margin-bottom: var(--sp-4); }
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a, .footer-col .info-value { font-size: 0.9375rem; color: var(--footer-text-muted); line-height: 1.7; }
.footer-col a:hover { color: #FFFFFF; }
.footer-social { display: flex; gap: var(--sp-2); }
.footer-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transition: background-color var(--transition);
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.16); }
.footer-bottom {
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--footer-text-muted);
}
.footer-bottom a { color: var(--footer-text-muted); }
.footer-bottom a:hover { color: #FFFFFF; }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
/* mobile: คอลัมน์เมนูพับเป็น accordion */
.footer-col > .footer-col__toggle { display: none; }
@media (max-width: 767px) {
  .footer-col--collapsible h3 { display: none; }
  .footer-col > .footer-col__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-size: 0.9375rem;
    font-weight: 600;
  }
  .footer-col__toggle svg { transition: transform var(--transition); }
  .footer-col__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .footer-col--collapsible ul { padding-top: var(--sp-4); }
  .footer-col--collapsible ul[hidden] { display: none; }
}

/* ==========================================================================
   15 · FORMS
   ========================================================================== */
.form { max-width: 640px; }
.form__row { margin-bottom: var(--sp-5); }
.form label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form .req { color: var(--brand-accent); }
.input, .textarea, .form .select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 1rem; /* ห้ามต่ำกว่า 16px ไม่งั้น iOS ซูมเอง */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.textarea { height: auto; min-height: 140px; padding: 14px 16px; resize: vertical; line-height: 1.75; }
.input:focus, .textarea:focus, .form .select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(18, 60, 99, 0.15);
}
@media (prefers-color-scheme: dark) {
  .input:focus, .textarea:focus, .form .select:focus { box-shadow: 0 0 0 3px rgba(127, 179, 224, 0.25); }
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { display: none; margin-top: 6px; font-size: 0.8125rem; color: var(--error); }
.field-error.is-visible { display: block; }
.form .select { padding-right: 40px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input[type="checkbox"] {
  flex: none;
  width: 20px; height: 20px;
  margin: 4px 0 0;
  accent-color: var(--brand-primary);
}
.checkbox-row label { font-size: 0.875rem; font-weight: 400; line-height: 1.7; margin: 0; }
.form__note { font-size: 0.8125rem; color: var(--text-muted); margin-top: var(--sp-3); }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-alert {
  display: none;
  padding: var(--sp-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--error);
  color: var(--error);
  font-size: 0.875rem;
  margin-bottom: var(--sp-5);
}
.form-alert.is-visible { display: block; }

/* ==========================================================================
   16 · ACCORDION / FAQ
   ========================================================================== */
.faq-list { display: grid; gap: var(--sp-3); }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  min-height: 56px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { background: var(--bg-alt); }
.faq-item__icon { flex: none; color: var(--brand-secondary); transition: transform var(--transition); }
.faq-item[open] .faq-item__icon { transform: rotate(180deg); }
.faq-item__body { padding: 0 var(--sp-5) var(--sp-5); }
.faq-item__body p { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
.faq-group + .faq-group { margin-top: var(--sp-12); }
.faq-group > h2 { margin-bottom: var(--sp-5); }

/* ==========================================================================
   17 · LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  background: rgba(11, 20, 32, 0.9);
}
.lightbox.is-open { display: flex; }
.lightbox__panel { position: relative; width: min(920px, 100%); }
.lightbox__figure { background: var(--surface); border-radius: var(--radius-md); overflow: hidden; }
.lightbox__figure .ph { border-radius: 0; }
.lightbox__cap { padding: var(--sp-4) var(--sp-5); }
.lightbox__cap h3 { font-size: 1.0625rem; color: var(--text); }
.lightbox__cap p { font-size: 0.875rem; color: var(--text-muted); margin: 4px 0 0; }
.lightbox__btn {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(11, 20, 32, 0.65);
  color: #FFFFFF;
}
.lightbox__btn:hover { background: rgba(11, 20, 32, 0.9); }
.lightbox__close { top: -60px; right: 0; }
.lightbox__prev { left: -60px; top: 40%; }
.lightbox__next { right: -60px; top: 40%; }
@media (max-width: 1023px) {
  .lightbox__close { top: -56px; }
  .lightbox__prev { left: 8px; top: auto; bottom: -64px; }
  .lightbox__next { right: 8px; top: auto; bottom: -64px; }
  .lightbox { padding-bottom: 88px; }
}

/* ==========================================================================
   18 · MOTION / UTILITIES
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 500ms ease-out, transform 500ms ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}
.no-js .reveal { opacity: 1; transform: none; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .cat-card:hover, .work-card:hover { transform: none; }
}

/* พิมพ์ */
@media print {
  .site-header, .demo-bar, .drawer, .sticky-contact, .cta-band, .filter-bar { display: none !important; }
  body { color: #000; }
}
