/* ===== Planet Pro Solution — design tokens (จาก design-system.md) ===== */
:root {
  --navy: #0f2f5f;
  --blue: #1f5fbf;
  --orange: #ea580c;
  --orange-soft: #f59e5b;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e3e8ef;
  --text: #1e293b;
  --muted: #64748b;
  --muted-2: #475569;
  --footer: #0a2247;
  --on-dark-muted: #b8c7e0;
  --font-head: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Sarabun', 'Segoe UI', Tahoma, sans-serif;
  --container: 1248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); margin: 0; line-height: 1.2; text-wrap: pretty; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 8px; font-family: var(--font-head); font-weight: 600; font-size: 16px; border: 1.5px solid transparent; transition: transform .15s ease, background .2s ease, box-shadow .2s ease; cursor: pointer; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(234,88,12,.25); }
.btn-primary:hover { background: #d9500a; color: #fff; }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: #c7d2e0; }
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---- eyebrow / section header ---- */
.eyebrow { display: block; font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }
.section-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
@media (min-width: 1024px) { .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 48px; } }
.section-head h2 { font-size: 28px; }
@media (min-width: 1024px) { .section-head h2 { font-size: 40px; } }
.section-head p { color: var(--muted); max-width: 420px; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
@media (min-width: 1024px) { .nav-inner { height: 80px; } }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 14px; white-space: nowrap; letter-spacing: .02em; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--muted); display: none; }
@media (min-width: 1024px) { .brand img { width: 48px; height: 48px; } .brand-name { font-size: 18px; } .brand-sub { display: block; } }
.nav-links { display: none; gap: 32px; font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.nav-links a { color: #334155; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); border-color: var(--blue); }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-phone { display: none; font-family: var(--font-head); font-weight: 600; color: var(--navy); }
@media (min-width: 1024px) { .nav-phone { display: inline; } }
.nav-cta .btn-icon { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; background: var(--orange); color: #fff; }
@media (min-width: 1024px) { .nav-cta .btn-icon { display: none; } }
.nav-cta .btn-quote { display: none; }
@media (min-width: 1024px) { .nav-cta .btn-quote { display: inline-flex; } }

/* ---- hero ---- */
.hero { background: var(--surface); position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -180px; top: -120px; width: 620px; height: 620px; border-radius: 50%; background: #eef3fb; z-index: 0; }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 32px; padding: 40px 0 36px; }
@media (min-width: 1024px) { .hero-inner { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 96px 0 88px; } }
.hero h1 { font-size: 34px; }
@media (min-width: 1024px) { .hero h1 { font-size: 54px; line-height: 1.18; } }
.hero h1 span { color: var(--blue); }
.hero-lead { color: var(--muted-2); font-size: 16px; line-height: 1.7; max-width: 540px; }
@media (min-width: 1024px) { .hero-lead { font-size: 19px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px; border: 1px solid #c7d7f0; border-radius: 999px; background: #f0f5fc; font-family: var(--font-head); font-weight: 500; font-size: 13px; color: var(--blue); }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero-actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }
.hero-checks { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted-2); }
.hero-checks span { display: inline-flex; align-items: center; gap: 8px; }
.hero-media { position: relative; }
.hero-media img { width: 100%; height: 220px; object-fit: cover; border-radius: 16px; box-shadow: 0 24px 48px rgba(15,47,95,.18); }
@media (min-width: 1024px) { .hero-media img { height: 440px; } }
.hero-badge { display: none; position: absolute; left: -32px; bottom: -28px; align-items: center; gap: 16px; padding: 18px 22px; background: var(--navy); color: #fff; border-radius: 12px; box-shadow: 0 16px 32px rgba(15,47,95,.25); }
@media (min-width: 1024px) { .hero-badge { display: flex; } }
.hero-badge .ic { width: 44px; height: 44px; border-radius: 10px; background: var(--blue); display: flex; align-items: center; justify-content: center; }
.hero-badge strong { font-family: var(--font-head); font-weight: 600; display: block; }
.hero-badge small { color: var(--on-dark-muted); font-size: 13px; }

/* ---- facts ---- */
.facts { background: var(--navy); color: #fff; }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 28px 0; }
@media (min-width: 1024px) { .facts-grid { grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; } .facts-grid > div { padding: 32px; border-right: 1px solid rgba(255,255,255,.12); } .facts-grid > div:first-child { padding-left: 0; } .facts-grid > div:last-child { border-right: 0; padding-right: 0; } }
.facts strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 20px; }
@media (min-width: 1024px) { .facts strong { font-size: 24px; } }
.facts small { color: var(--on-dark-muted); font-size: 13px; }

/* ---- cards / grids ---- */
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; color: inherit; }
a.card:hover { box-shadow: 0 16px 32px rgba(15,47,95,.12); transform: translateY(-2px); color: inherit; }
.card-img { position: relative; aspect-ratio: 3 / 2; background: #e2e8f0; overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 19px; font-weight: 600; line-height: 1.35; }
.card p { color: var(--muted); font-size: 15px; }
.tag { position: absolute; left: 14px; top: 14px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--navy); font-family: var(--font-head); font-weight: 600; font-size: 12px; }
.count { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; background: rgba(15,47,95,.85); color: #fff; font-size: 12px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.meta span > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--blue); margin-top: 4px; }

/* ---- process ---- */
.process { display: grid; gap: 32px; }
@media (min-width: 1024px) { .process { grid-template-columns: 440px 1fr; gap: 80px; align-items: start; } .process-side { position: sticky; top: 100px; } }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) { .step { grid-template-columns: 64px 1fr; gap: 24px; padding: 24px 0; } }
.step:last-child { border-bottom: 0; }
.step-no { width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
@media (min-width: 1024px) { .step-no { width: 56px; height: 56px; font-size: 20px; border-radius: 12px; } }
.step-no.last { background: var(--orange); }
.step h3 { font-size: 16px; font-weight: 600; }
@media (min-width: 1024px) { .step h3 { font-size: 20px; } }
.step p { color: var(--muted); font-size: 14px; }
@media (min-width: 1024px) { .step p { font-size: 15px; } }

/* ---- clients ---- */
.clients-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 1024px) { .clients-grid { grid-template-columns: repeat(6, 1fr); gap: 16px; } }
.client { display: flex; align-items: center; justify-content: center; height: 64px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--muted-2); text-align: center; }
@media (min-width: 1024px) { .client { height: 80px; } }
.client img { max-height: 44px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: .2s; }
.client:hover img { filter: none; opacity: 1; }

/* ---- contact ---- */
.contact { background: var(--navy); color: #fff; }
.contact h2 { color: #fff; font-size: 28px; }
@media (min-width: 1024px) { .contact h2 { font-size: 44px; } }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 520px; gap: 80px; align-items: center; } }
.contact-lead { color: var(--on-dark-muted); max-width: 520px; }
.contact-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.contact-item { display: flex; align-items: center; gap: 14px; }
.contact-item .ic { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item strong { display: block; font-family: var(--font-head); font-weight: 600; }
.contact-item small { color: var(--on-dark-muted); font-size: 14px; }
.contact-item a { color: #fff; }
.form-card { background: var(--surface); color: var(--text); border-radius: 16px; padding: 24px 20px; box-shadow: 0 24px 48px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1024px) { .form-card { padding: 36px; } }
.form-card h3 { font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: 14px; color: #334155; }
.field label .req { color: #dc2626; }
.field input, .field select, .field textarea { min-height: 46px; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; background: #fff; color: var(--text); width: 100%; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form-row { display: grid; gap: 14px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 13px; color: var(--muted); text-align: center; }
.form-success { padding: 16px; border-radius: 10px; background: #ecfdf5; color: #047857; font-family: var(--font-head); font-weight: 500; }
.form-error { padding: 12px 14px; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 14px; }

/* ---- footer ---- */
.footer { background: var(--footer); color: var(--on-dark-muted); font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0; text-align: center; }
@media (min-width: 1024px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; padding: 32px 0; } }
.footer .brand { color: #fff; font-family: var(--font-head); font-weight: 600; }
.footer .brand img { width: 36px; height: 36px; }
.footer-links { display: flex; gap: 24px; font-family: var(--font-head); font-weight: 500; }
.footer-links a { color: var(--on-dark-muted); }
.footer-links a:hover { color: #fff; }

/* ---- portfolio page ---- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 40px 0 32px; }
@media (min-width: 1024px) { .page-head { padding: 64px 0 40px; } }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs .current { color: var(--navy); font-weight: 500; }
.page-head h1 { font-size: 32px; }
@media (min-width: 1024px) { .page-head h1 { font-size: 44px; } }
.page-head p { color: var(--muted-2); font-size: 16px; max-width: 760px; margin-top: 12px; }
@media (min-width: 1024px) { .page-head p { font-size: 18px; } }
.filters { position: sticky; top: 64px; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); }
@media (min-width: 1024px) { .filters { top: 80px; } }
.filters-inner { display: flex; gap: 10px; padding: 16px 0; overflow-x: auto; scrollbar-width: none; }
.filters-inner::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: #334155; font-family: var(--font-head); font-weight: 500; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip b { padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: 12px; font-weight: 500; }
.chip.active b { background: rgba(255,255,255,.18); color: #fff; }
.empty { padding: 64px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; }
.empty strong { display: block; font-family: var(--font-head); font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.cta-band { background: var(--navy); color: #fff; }
.cta-band-inner { display: flex; flex-direction: column; gap: 20px; padding: 48px 0; }
@media (min-width: 1024px) { .cta-band-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; padding: 56px 0; } }
.cta-band strong { display: block; font-family: var(--font-head); font-weight: 700; font-size: 24px; line-height: 1.25; }
@media (min-width: 1024px) { .cta-band strong { font-size: 30px; } }
.cta-band span { color: var(--on-dark-muted); }

/* ---- project detail ---- */
.detail-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 32px 0; }
.detail-head h1 { font-size: 28px; }
@media (min-width: 1024px) { .detail-head h1 { font-size: 40px; } }
.detail-grid { display: grid; gap: 32px; padding: 32px 0 64px; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 1fr 400px; gap: 48px; align-items: start; } .detail-side { position: sticky; top: 100px; } }
.gallery-main { position: relative; border-radius: 14px; overflow: hidden; background: var(--navy); aspect-ratio: 16 / 10; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .gallery-thumbs { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .gallery-thumbs { grid-template-columns: repeat(6, 1fr); gap: 12px; } }
.gallery-thumbs a { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; }
.gallery-thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery-thumbs a:hover img { transform: scale(1.04); }
.gallery-thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.detail-section { margin-top: 32px; }
.detail-section h2 { font-size: 22px; margin-bottom: 14px; }
@media (min-width: 1024px) { .detail-section h2 { font-size: 24px; } }
.rich { color: var(--muted-2); }
.rich p { margin-bottom: 12px; }
.rich ul, .rich ol { padding-left: 22px; margin: 0 0 12px; }
.scope { display: grid; gap: 12px; }
@media (min-width: 640px) { .scope { grid-template-columns: 1fr 1fr; } }
.scope div { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 15px; }
.before-after { display: grid; gap: 16px; }
@media (min-width: 640px) { .before-after { grid-template-columns: 1fr 1fr; } }
.before-after figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 2; }
.before-after img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.before-after figcaption { position: absolute; left: 14px; top: 14px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 12px; }
.before-after figure.after figcaption { background: var(--orange); color: #fff; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.info-card header { padding: 18px 22px; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; }
.info-card dl { margin: 0; }
.info-card .row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--border); font-size: 15px; }
.info-card .row:last-child { border-bottom: 0; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; font-weight: 600; color: var(--navy); text-align: right; }
.side-cta { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.side-cta h3 { font-size: 18px; }
.side-cta p { color: var(--muted); font-size: 15px; }
.related { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (min-width: 1024px) { .related { grid-template-columns: repeat(4, 1fr); } }
.related a { color: inherit; display: flex; flex-direction: column; gap: 8px; }
.related .thumb { position: relative; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #e2e8f0; }
.related img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.related strong { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--navy); }
.related small { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---- static-site additions ---- */
.nav-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--navy); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-links.open { display: flex; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 20px 16px; }
.nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
.nav { position: sticky; }
.hidden { display: none !important; }
.lightbox { position: fixed; inset: 0; background: rgba(10,34,71,.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--navy); font-size: 22px; }
