/* ============ PATPAT METAL WORK — design system ============ */
:root {
  --navy: #16265f;
  --navy-2: #1e327f;
  --blue: #24439b;
  --blue-light: #5c8ac9;
  --gold: #f4b21c;
  --gold-2: #ffca3a;
  --ink: #16203a;
  --muted: #5b6478;
  --line: #e4e8f2;
  --bg: #f5f7fc;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(22, 38, 95, .10);
  --shadow-sm: 0 4px 14px rgba(22, 38, 95, .08);
  --radius: 16px;
  --maxw: 1200px;
  --head: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
  --body: "Noto Sans Thai", "IBM Plex Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.25; color: var(--navy); margin: 0 0 .5em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--head); font-weight: 500; font-size: 1rem;
  padding: .7em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; box-shadow: 0 8px 20px rgba(36, 67, 155, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(36, 67, 155, .38); color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2c00; box-shadow: 0 8px 20px rgba(244, 178, 28, .35); }
.btn-gold:hover { transform: translateY(-2px); color: #3a2c00; }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--blue); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 46px; height: 46px; }
.brand .bt { font-family: var(--head); font-weight: 600; color: var(--navy); line-height: 1.1; font-size: 1.02rem; }
.brand .bt small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; letter-spacing: .12em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { font-family: var(--head); color: var(--ink); padding: .5em .9em; border-radius: 8px; font-size: .98rem; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: #eef2fb; }
/* keep button styling inside the nav (nav link rules must not override button text color) */
.nav-links a.btn { background: initial; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover, .nav-links a.btn-primary.active { color: #fff; background: linear-gradient(135deg, var(--blue), var(--navy)); }
.nav-links a.btn-gold, .nav-links a.btn-gold:hover { color: #3a2c00; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(16, 26, 62, .94) 0%, rgba(22, 38, 95, .86) 42%, rgba(30, 50, 127, .62) 100%),
    var(--hero-img, none) center/cover no-repeat;
}
.hero-inner { position: relative; padding: 92px 0 108px; max-width: 720px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .5em; font-family: var(--head); letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; color: var(--gold-2); background: rgba(244, 178, 28, .12); border: 1px solid rgba(244, 178, 28, .3); padding: .4em 1em; border-radius: 999px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.3rem); margin: 22px 0 8px; font-weight: 600; }
.hero h1 .en { display: block; font-size: .42em; letter-spacing: .18em; color: var(--blue-light); font-weight: 400; margin-top: 6px; }
.hero p.lead { font-size: 1.15rem; color: #dbe4f5; margin: 0 0 30px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-diag { position: absolute; right: -60px; bottom: -2px; width: 46%; height: 100%; background: repeating-linear-gradient(115deg, var(--gold) 0 14px, transparent 14px 46px); opacity: .10; transform: skewX(-14deg); pointer-events: none; }

/* ---------- sections ---------- */
section { padding: 74px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section-head .kicker { font-family: var(--head); color: var(--gold); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 8px 0 10px; }
.section-head p { color: var(--muted); margin: 0; }
.bar { width: 62px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); margin: 14px auto 0; }
.alt { background: linear-gradient(180deg, #fff, #f0f4fc); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.about-grid .media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.about-grid .media img { width: 100%; height: 100%; object-fit: cover; }
.about-grid .media .badge { position: absolute; left: 0; bottom: 0; background: var(--navy); color: #fff; padding: 14px 22px; font-family: var(--head); }
.about-grid .media .badge b { color: var(--gold-2); font-size: 1.5rem; display: block; }
.about-txt h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.about-txt .en { color: var(--muted); font-size: .96rem; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.facts { display: flex; gap: 30px; margin-top: 26px; flex-wrap: wrap; }
.facts .f b { font-family: var(--head); color: var(--blue); font-size: 1.05rem; }
.facts .f span { display: block; color: var(--muted); font-size: .85rem; }

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.svc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.svc::after { content: ""; position: absolute; top: 0; right: 0; width: 68px; height: 68px; background: linear-gradient(135deg, transparent 50%, rgba(244, 178, 28, .16) 50%); }
.svc:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.svc .ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #eaf0ff, #dbe6ff); color: var(--blue); margin-bottom: 16px; }
.svc .ic svg { width: 30px; height: 30px; }
.svc h3 { font-size: 1.12rem; margin-bottom: 8px; }
.svc p { color: var(--muted); font-size: .92rem; margin: 0; }
.svc ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: .88rem; }
.svc ul li { margin: 3px 0; }

/* ---------- feature strip ---------- */
.feature { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 20px, transparent 20px 60px); }
.feature .container { position: relative; }
.feature h2 { color: #fff; }
.feature .lead { color: #cdd8ef; max-width: 620px; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 34px; }
.feat-grid .fi { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 24px; }
.feat-grid .fi .n { font-family: var(--head); color: var(--gold-2); font-weight: 600; font-size: 1.4rem; }
.feat-grid .fi h4 { color: #fff; margin: 6px 0; font-size: 1.05rem; }
.feat-grid .fi p { color: #b9c6e4; font-size: .9rem; margin: 0; }

/* ---------- stalpat banner ---------- */
.stalpat { background: linear-gradient(120deg, #101a3e, #24439b); color: #fff; border-radius: 24px; padding: 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; align-items: center; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.stalpat::after { content: "STALPAT"; position: absolute; right: -10px; bottom: -26px; font-family: var(--head); font-weight: 700; font-size: 7rem; color: rgba(255, 255, 255, .05); letter-spacing: .05em; }
.stalpat h2 { color: #fff; font-size: 2rem; }
.stalpat .tag { color: var(--gold-2); font-family: var(--head); letter-spacing: .18em; text-transform: uppercase; font-size: .82rem; }
.stalpat p { color: #d6dff2; }
.stalpat .prev { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; z-index: 1; }
.stalpat .prev img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); }

/* ---------- portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.chip { font-family: var(--head); border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: .55em 1.3em; border-radius: 999px; cursor: pointer; font-size: .95rem; transition: .15s; }
.chip:hover { border-color: var(--blue-light); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #e9edf6; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.06); }
.card .cat { position: absolute; top: 12px; left: 12px; background: rgba(22, 38, 95, .9); color: #fff; font-family: var(--head); font-size: .72rem; padding: .3em .8em; border-radius: 999px; letter-spacing: .04em; }
.card .count { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.55); color: #fff; font-size: .74rem; padding: .25em .6em; border-radius: 8px; display: flex; align-items: center; gap: 4px; }
.card .body { padding: 16px 18px 20px; }
.card .body h3 { font-size: 1.02rem; margin: 0; color: var(--ink); font-weight: 500; }
.card .body p { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }

/* products */
.prod .thumb { aspect-ratio: 1; }
.prod .body { display: flex; flex-direction: column; flex: 1; }
.prod .body p { flex: 1; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.cinfo { list-style: none; margin: 0; padding: 0; }
.cinfo li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.cinfo li:last-child { border-bottom: 0; }
.cinfo .ic { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; background: #eef2fb; color: var(--blue); display: grid; place-items: center; }
.cinfo .ic svg { width: 22px; height: 22px; }
.cinfo b { display: block; font-family: var(--head); color: var(--navy); font-weight: 500; }
.cinfo a, .cinfo span { color: var(--muted); word-break: break-word; }
.contact-cta { background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff; border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.contact-cta h3 { color: #fff; font-size: 1.5rem; }
.contact-cta p { color: #cdd8ef; }
.contact-cta .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.map-wrap { position: relative; margin-top: 24px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #e9edf6; }
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; }
.map-open { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: .5em; background: #fff; color: var(--navy); font-family: var(--head); font-weight: 500; font-size: .92rem; padding: .6em 1.1em; border-radius: 999px; box-shadow: var(--shadow-sm); }
.map-open:hover { color: var(--blue); transform: translateY(-2px); }
@media (max-width: 640px) { .map-wrap iframe { height: 300px; } .map-open { font-size: .82rem; right: 10px; bottom: 10px; } }

/* ---------- footer ---------- */
.site-footer { background: #0f1734; color: #b9c3dd; padding: 54px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand img { width: 54px; height: 54px; background: #fff; border-radius: 12px; padding: 5px; }
.foot-brand .bt { font-family: var(--head); color: #fff; font-size: 1.05rem; }
.foot-brand small { color: #8b98bd; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #b9c3dd; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--gold-2); }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 34px; padding-top: 20px; text-align: center; font-size: .84rem; color: #8b98bd; }
.foot-bottom a { color: #b9c3dd; display: inline; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(9, 14, 33, .94); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb .cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-family: var(--head); }
.lb .x, .lb .prev-b, .lb .next-b { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; display: grid; place-items: center; }
.lb .x:hover, .lb .prev-b:hover, .lb .next-b:hover { background: rgba(255, 255, 255, .25); }
.lb .x { top: 22px; right: 22px; }
.lb .prev-b { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .next-b { right: 18px; top: 50%; transform: translateY(-50%); }

.empty { text-align: center; color: var(--muted); padding: 40px; grid-column: 1 / -1; }
.loading { text-align: center; color: var(--muted); padding: 60px; grid-column: 1 / -1; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .stalpat { grid-template-columns: 1fr; padding: 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 18px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-140%); transition: transform .25s; }
  .nav-links.show { transform: translateY(0); }
  .nav-links a { padding: .8em; }
  .nav-cta { margin: 6px 0 0; }
  .nav-toggle { display: block; }
  .grid, .svc-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero-inner { padding: 64px 0 78px; }
}
