/* =========================================================
   FilmLab — รับติดฟิล์มอาคาร
   ========================================================= */

/* สี CI: กรมท่า #17324D (หลัก) · ฟ้าใส #28A9D6 (รอง) · ส้มอุ่น #F2A65A (เน้นเล็กน้อย) · ขาวนวล #FAFAF7 (พื้น) */
:root {
  --ink: #17324d;
  --ink-2: #45586b;
  --muted: #6e7c89;
  --bg: #fafaf7;
  --surface: #ffffff;
  --border: #e4e7ea;

  --brand: #17324d;
  --brand-dark: #0f2438;
  --brand-soft: #e8f5fb;
  --sky: #28a9d6;
  --sun: #f2a65a;
  --sun-soft: #fdf1e3;
  --ice: var(--sky);
  --heat: var(--sun);
  --line: #06c755;
  --line-dark: #05a647;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(23, 50, 77, .05), 0 10px 30px -8px rgba(23, 50, 77, .14);
  --max: 1160px;

  --font-head: "Prompt", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 72px; }

:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-fill { fill: currentColor; stroke: none; }
.line-green { color: var(--line); }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .8em 1.4em;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-line {
  background: var(--line);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(6, 199, 85, .55);
}
.btn-line:hover { background: var(--line-dark); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

.btn-sm { padding: .55em 1.1em; font-size: .95rem; }
.btn-lg { padding: .95em 1.6em; font-size: 1.06rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.logo { display: flex; align-items: center; gap: 14px; }
.logo-img { display: block; flex: none; width: auto; height: 44px; }
.logo-light { filter: invert(1); }
.logo-tag {
  padding-left: 14px;
  font-size: .76rem;
  line-height: 1.4;
  color: var(--muted);
  border-left: 1px solid var(--border);
}

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: .4em .8em;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand); }

.header-cta { display: flex; align-items: center; gap: 18px; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
}
.header-phone .i { color: var(--brand); }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 8px;
  background:
    radial-gradient(900px 480px at 88% -10%, #dcf0f9 0%, transparent 65%),
    linear-gradient(180deg, #f2f8fb 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: .35em .95em;
  font-size: .88rem;
  font-weight: 500;
  color: var(--brand-dark);
  background: #fff;
  border: 1px solid #cfe8f3;
  border-radius: 999px;
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.28;
}

.grad {
  background: linear-gradient(90deg, var(--brand) 0%, #28a9d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 32em;
  margin-bottom: 28px;
  font-size: 1.12rem;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .95rem;
  color: var(--ink-2);
}
.checks li { display: flex; align-items: center; gap: 6px; }
.checks .i { color: var(--brand); stroke-width: 2.6; }

/* Before / after window */

.ba {
  --pos: 50%;
  --photo-pos: 50% 60%;
  --sun-x: 22%;
  --sun-y: 10%;
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #d6eaf3;
  box-shadow: 0 30px 60px -24px rgba(23, 50, 77, .4), 0 0 0 1px rgba(23, 50, 77, .06);
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}

.ba-layer { position: absolute; inset: 0; }

.ba-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-pos);
}

.ba-after { clip-path: inset(0 0 0 var(--pos)); }

/* ไม่ติดฟิล์ม: แดดจ้า ภาพซีด อมส้ม */
.ba-before .ba-photo { filter: brightness(1.08) contrast(.84) saturate(.82) sepia(.2); }
.glare {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at var(--sun-x) var(--sun-y), #fffdf2 0, #fff6d8 5%, rgba(255, 228, 170, .85) 11%, rgba(255, 196, 120, .45) 26%, rgba(255, 160, 80, .18) 48%, transparent 72%),
    linear-gradient(180deg, rgba(255, 170, 80, .28), rgba(255, 140, 60, .12));
  animation: glare 4s ease-in-out infinite;
}
@keyframes glare {
  0%, 100% { opacity: .9; }
  50% { opacity: 1; }
}

/* ติดฟิล์มแล้ว: แสงนุ่ม สีชัด โทนเย็น */
.ba-after .ba-photo { filter: saturate(1.15) contrast(1.08) brightness(.93); }
.tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--sun-x) var(--sun-y), rgba(255, 250, 235, .45) 0, rgba(255, 250, 235, .12) 7%, transparent 18%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .1) 45%, transparent 58%),
    linear-gradient(180deg, rgba(23, 50, 77, .26), rgba(23, 50, 77, .12));
}

.ba-badge {
  position: absolute;
  top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: .3em .8em .3em .6em;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  border-radius: 999px;
}
.ba-before .ba-badge { left: 26px; color: var(--ink); background: rgba(242, 166, 90, .95); }
.ba-after .ba-badge { right: 26px; background: rgba(23, 50, 77, .9); }

.ba-label {
  position: absolute;
  bottom: 26px;
  padding: .25em .75em;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
}
.ba-before .ba-label { left: 26px; }
.ba-after .ba-label { right: 26px; }

.ba-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 12px solid #f4f7f9;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), inset 0 10px 24px rgba(0, 0, 0, .12);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 3;
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
  pointer-events: none;
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--brand);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transform: translate(-50%, -50%);
}
.ba-knob .i { width: 22px; height: 22px; stroke-width: 2.4; }

.ba-range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
}
.ba:has(.ba-range:focus-visible) .ba-knob { outline: 3px solid var(--ice); outline-offset: 2px; }

.ba-caption {
  margin-top: 14px;
  font-size: .85rem;
  text-align: center;
  color: var(--muted);
}

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 56px 0 0;
  padding: 26px 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stats li {
  padding: 2px 12px;
  text-align: center;
  border-left: 1px solid var(--border);
}
.stats li:first-child { border-left: 0; }
.stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand);
}
.stats span { font-size: .92rem; color: var(--ink-2); }

.footnote {
  margin-top: 10px;
  font-size: .78rem;
  text-align: right;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: #fff; }

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p { font-size: 1.05rem; color: var(--ink-2); }

.kicker {
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 600;
  color: var(--brand);
}
/* แต้มส้ม (แสงแดด) หน้าหัวข้อเล็กของแต่ละส่วน */
.kicker::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--sun);
  border-radius: 2px;
}
.kicker.light { color: #7ccdeb; }

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
}

/* ---------- Finder ---------- */

.finder {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: stretch;
}

.finder-tabs { display: flex; flex-direction: column; gap: 10px; }

.finder-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  font: inherit;
  text-align: left;
  color: inherit;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.finder-tab:hover { border-color: #bfe3f2; }
.finder-tab[aria-selected="true"] {
  background: var(--brand-soft);
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(40, 169, 214, .16);
}
.finder-tab strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.finder-tab small { display: block; font-size: .85rem; color: var(--muted); }

.tab-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--brand);
  background: var(--bg);
  border-radius: 12px;
  transition: background-color .15s ease, color .15s ease;
}
.tab-icon .i { width: 22px; height: 22px; }
.finder-tab[aria-selected="true"] .tab-icon { color: #fff; background: var(--brand); }

.finder-panels { display: grid; }

.finder-panel {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: panel-in .35s ease;
}
.finder-panel[hidden] { display: none; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.swatch {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  padding: 14px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(23, 50, 77, .06);
}
.swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45) 45%, transparent 58%);
}
.swatch span {
  position: relative;
  padding: .25em .7em;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
}

.swatch-heat {
  background:
    radial-gradient(circle at 70% 24%, rgba(255, 255, 255, .85) 0 26px, rgba(255, 255, 255, .25) 27px 60px, transparent 61px),
    linear-gradient(165deg, #ddf1fa 0%, #7fc6e3 100%);
}
.swatch-privacy {
  background: linear-gradient(135deg, #eef2f5 0%, #a6b5bf 28%, #f7f9fa 46%, #8f9faa 66%, #dfe6ea 100%);
}
.swatch-safety {
  background-color: #d3e9f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 260' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='white' stroke-width='1.6' stroke-linejoin='round' opacity='.95'%3E%3Cpath d='M120 110 20 20M120 110 200 55M120 110 185 260M120 110 35 250M120 110 0 145M120 110 135 0M120 110 200 170'/%3E%3Cpath d='M98 92 121 84 143 97 142 124 117 136 97 121Z'/%3E%3Cpath d='M75 70 128 58 168 84 172 140 128 168 72 150 60 110Z' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}
.swatch-decor {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, .95) 0 20px, rgba(160, 200, 222, .45) 20px 28px),
    #e9f0f4;
}

.pill {
  display: inline-block;
  padding: .2em .75em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
}
.panel-body h3 { margin: 10px 0 8px; font-size: 1.5rem; }
.panel-body > p { color: var(--ink-2); }
.panel-body h4 { margin: 18px 0 8px; font-size: 1rem; }

.ticks {
  display: grid;
  gap: 6px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
}
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: "";
  position: absolute;
  top: .3em;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317324d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.panel-body .note {
  margin: -8px 0 22px;
  padding: 10px 14px;
  font-size: .9rem;
  color: #8a4f14;
  background: var(--sun-soft);
  border: 1px solid #f6d2a8;
  border-radius: 12px;
}

/* ---------- Brands ---------- */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 96px;
  padding: 0 16px;
  font-family: var(--font-head);
  font-weight: 600;
  text-align: center;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.brand:hover {
  border-color: #bfe3f2;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.brand img {
  display: block;
  width: auto;
  height: var(--h, 36px);
  max-width: 82%;
  object-fit: contain;
}

.brand-more {
  grid-column: 1 / -1;  /* 8 แบรนด์: 4 คอลัมน์ = การ์ดนี้เต็มแถวสุดท้าย */
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px dashed #a8d8ec;
}
.brand-more:hover { transform: none; box-shadow: none; }
.brand-more > span { text-align: center; }
.brand-more > span > span { white-space: nowrap; }  /* ตัดบรรทัดระหว่างวลีเท่านั้น */

.brand-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 22px 26px;
  background: linear-gradient(90deg, var(--brand-soft), var(--sun-soft));
  border-radius: var(--radius-lg);
}
.brand-note p { color: var(--ink-2); }
.brand-note strong { color: var(--ink); }

.fineprint {
  margin-top: 16px;
  font-size: .78rem;
  text-align: center;
  color: var(--muted);
}


/* ---------- Works ---------- */

.works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.work {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.work:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
a.work:hover .work-media img { transform: scale(1.04); }

.work-media {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  overflow: hidden;
  background: var(--border);
}
.work-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.work-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: .15em .75em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: #fff;
  border-radius: 999px;
}
.work-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: .15em .7em;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(23, 50, 77, .6);
  border-radius: 999px;
}
.work-count .i { width: 15px; height: 15px; }

.work-body { padding: 16px 20px 20px; }
.work-body h3 { margin-bottom: 2px; font-size: 1.08rem; }
.work-body p { font-size: .92rem; color: var(--muted); }

.work-cta {
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  padding: 28px;
  background: var(--brand-soft);
  border: 1px dashed #a8d8ec;
}
.work-cta-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
}
.work-cta p:not(.work-cta-title) { margin-bottom: 10px; color: var(--ink-2); }

/* แสดง 5 งานแรกบนคอม แล้วกด "ดูผลงานทั้งหมด" (มือถือปัดดูได้ครบอยู่แล้ว) */
.works-more { display: flex; justify-content: center; margin-top: 28px; }
@media (min-width: 761px) {
  .works.is-collapsed .work-extra { display: none; }
  .works:not(.is-collapsed) .work-cta { grid-column: span 2; }
}

/* Lightbox */

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(6, 12, 18, .98);
  border: 0;
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(6, 12, 18, .6); }
body:has(.lightbox[open]) { overflow: hidden; }

.lb-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 24px;
}
.lb-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-head);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lb-count { font-size: .9rem; color: #9fb2bd; font-variant-numeric: tabular-nums; }

.lb-close,
.lb-nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .15s ease;
}
.lb-close:hover,
.lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-close .i,
.lb-nav .i { width: 22px; height: 22px; }

.lb-stage {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 76px calc(24px + env(safe-area-inset-bottom, 0px));
  touch-action: pan-y;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-select: none;
}
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 26px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42px;
  right: -15px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #a8d8ec;
  border-right: 2px solid #a8d8ec;
  transform: rotate(45deg);
}

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border-radius: 12px;
}
.section-alt .step { background: var(--bg); }
.step h3 { margin-bottom: 6px; font-size: 1.12rem; }
.step p { font-size: .95rem; color: var(--ink-2); }

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 56px;
  align-items: start;
}
.faq-head { position: sticky; top: 100px; }
.faq-head > p { margin-bottom: 22px; color: var(--ink-2); }

.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list details:first-child { border-top: 1px solid var(--border); }

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--brand); }

.plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  transition: transform .2s ease;
}
.plus .i { width: 16px; height: 16px; stroke-width: 2.6; }
details[open] .plus { transform: rotate(45deg); }

.faq-list details p { padding: 0 46px 22px 0; color: var(--ink-2); }

/* ---------- Contact ---------- */

.contact {
  padding: 96px 0;
  color: #fff;
  background:
    radial-gradient(800px 420px at 8% 0%, rgba(40, 169, 214, .22), transparent 60%),
    linear-gradient(160deg, #1e4266 0%, #102338 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.contact h2 { margin-bottom: 16px; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.contact-copy > p {
  max-width: 30em;
  margin-bottom: 28px;
  font-size: 1.08rem;
  color: #c8d6e2;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.contact-info {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c8d6e2;
}
.contact-info li { display: flex; align-items: center; gap: 10px; }
.contact-info .i { color: var(--ice); }

.line-qr {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 420px;
  margin-top: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
}
.line-qr img { flex: none; width: 112px; height: 112px; border-radius: 8px; }
.line-qr-title { margin-bottom: 2px; font-family: var(--font-head); font-weight: 600; color: #fff; }
.line-qr p:not(.line-qr-title) { font-size: .9rem; color: #c8d6e2; }
.line-qr strong { color: #fff; }

.quote-form {
  padding: 32px;
  color: var(--ink);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.quote-form h3 { margin-bottom: 2px; font-size: 1.35rem; }
.quote-form .sub { margin-bottom: 20px; font-size: .92rem; color: var(--muted); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .9rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .7em .9em;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.field select {
  padding-right: 2.4em;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7c88' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right .85em center;
  background-size: 16px;
  background-repeat: no-repeat;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(40, 169, 214, .2);
}

.err { display: none; font-size: .82rem; color: #d1343a; }
.field.invalid input { border-color: #e5484d; }
.field.invalid .err { display: block; }

.quote-form .btn-block { margin-top: 6px; }
.form-note { margin-top: 12px; font-size: .82rem; text-align: center; color: var(--muted); }
.form-status { margin-top: 6px; font-size: .92rem; font-weight: 500; text-align: center; color: var(--line-dark); }
.form-status:empty { display: none; }
.form-open { margin-top: 10px; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0;
  font-size: .9rem;
  color: #94a6b8;
  background: #0e1e2f;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-footer .logo-img { height: 52px; }
.site-footer .logo-tag { font-size: .85rem; color: #94a6b8; border-color: rgba(255, 255, 255, .15); }

/* ---------- Mobile contact bar ---------- */

.mobile-bar { display: none; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glare, .finder-panel { animation: none; }
  .btn:hover, .brand:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 620px; }

  .finder { grid-template-columns: 1fr; }
  .finder-tabs { display: grid; grid-template-columns: 1fr 1fr; }

  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-more { grid-column: span 1; }  /* 3 คอลัมน์: ต่อท้าย 2 แบรนด์สุดท้าย */

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

  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }

  .faq-grid { grid-template-columns: 1fr; gap: 28px; }
  .faq-head { position: static; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }

  .header-inner { height: 60px; }
  .logo-img { height: 38px; }
  .header-cta { display: none; }

  .hero { padding-top: 32px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .ba-badge { top: 20px; font-size: .95rem; }
  .ba-before .ba-badge, .ba-before .ba-label { left: 20px; }
  .ba-after .ba-badge, .ba-after .ba-label { right: 20px; }
  .ba-label { bottom: 20px; font-size: .78rem; }
  .ba-frame { border-width: 9px; }

  .stats { grid-template-columns: 1fr 1fr; margin-top: 40px; padding: 4px 8px; }
  .stats li { padding: 16px 8px; border-left: 0; }
  .stats li:nth-child(even) { border-left: 1px solid var(--border); }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--border); }

  .finder-tab { gap: 10px; padding: 12px; }
  .finder-tab small { display: none; }
  .finder-tab strong { font-size: .92rem; }
  .tab-icon { width: 36px; height: 36px; border-radius: 10px; }
  .tab-icon .i { width: 19px; height: 19px; }
  .finder-panel { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .swatch { min-height: 120px; }
  .panel-body h3 { font-size: 1.3rem; }
  .panel-body .btn { width: 100%; }

  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand { height: 76px; padding: 0 10px; }
  .brand img { height: calc(var(--h, 36px) * .82); }
  .brand-more { grid-column: 1 / -1; height: 60px; font-size: .95rem; }
  .brand-note { flex-direction: column; align-items: stretch; padding: 20px; }

  /* มือถือ: ปัดดูผลงานแนวนอน */
  .works {
    display: flex;
    gap: 14px;
    margin: 0 -16px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .works::-webkit-scrollbar { display: none; }
  .work { flex: 0 0 80%; scroll-snap-align: start; }
  a.work:hover { transform: none; }
  .works-more { display: none; }
  .lb-stage { padding: 0 8px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .lb-nav { background: rgba(0, 0, 0, .45); }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }

  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px; }
  .step-num { grid-row: span 2; margin-bottom: 0; }

  .faq-list summary { font-size: 1rem; }
  .faq-list details p { padding-right: 0; }

  .contact { padding: 64px 0; }
  .line-qr { display: none; }
  .contact-actions .btn { flex: 1 1 auto; }
  .quote-form { padding: 24px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
  }
  .mobile-bar .btn { padding: .8em 1em; }
}
