/* เว็บไซต์การตลาด PANN HR (งาน 027) — เขียนด้วยมือ ไม่มีเฟรมเวิร์ก · mobile-first · ใช้แบบอักษรของเครื่อง (ไม่โหลดจากภายนอก) */
:root {
  --brand: #1f5eff; --brand-dark: #1747c4; --brand-soft: #e8efff;
  --ink: #1b2233; --ink-soft: #5b6478; --line: #e3e7ef; --bg: #f5f7fb; --card: #ffffff;
  --ok: #138a52; --ok-soft: #e3f6ec; --warn: #b26a00; --warn-soft: #fff4de; --bad: #c62828;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 6px 20px rgba(20, 30, 60, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--card); line-height: 1.65; font-size: 17px;
  font-family: "Sarabun", "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.small { font-size: .88rem; color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.sub { color: var(--ink-soft); }
.hidden { display: none !important; }
.muted { color: var(--ink-soft); }
section { padding: 48px 0; }
section.alt { background: var(--bg); }

/* ปุ่ม (ใช้ร่วมกับแถบคุกกี้) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.big { min-height: 54px; padding: 12px 24px; font-size: 1.05rem; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: .95rem; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }

/* ส่วนหัว */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .85rem; }
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; }
.site-nav > a:not(.btn) { color: var(--ink); text-decoration: none; padding: 8px 2px; font-weight: 500; }
.site-nav > a:not(.btn):hover { color: var(--brand); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: .85rem; font-weight: 700; }
.lang a, .lang b { padding: 6px 12px; text-decoration: none; color: var(--ink-soft); }
.lang b { background: var(--brand); color: #fff; }
.nav-btn { display: none; margin-left: auto; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-weight: 600; }
@media (max-width: 860px) {
  .js .nav-btn { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 0 16px; margin: 0; }
  .js .site-nav.open { display: flex; }
  .js .site-nav > a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .js .site-nav .lang { align-self: flex-start; margin: 10px 0; }
}

/* ส่วนเปิด */
.hero { padding: 44px 0 36px; background: linear-gradient(170deg, var(--brand-soft) 0%, #fff 60%); }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; } }
.hero-shot { display: flex; justify-content: center; }
.phone-img { width: min(280px, 72vw); border-radius: 28px; border: 8px solid #10182b; box-shadow: var(--shadow); }
.wide-img { width: 100%; max-width: 560px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.crumb { font-size: .9rem; margin-bottom: 8px; }
.crumb a { color: var(--ink-soft); }

/* การ์ดและตาราง */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.four, .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
a.card:hover { border-color: var(--brand); }
.card p { color: var(--ink-soft); margin-bottom: 8px; }
.more { color: var(--brand-dark); font-weight: 600; font-size: .95rem; }
.shots { display: grid; gap: 28px; align-items: start; margin-top: 20px; }
@media (min-width: 900px) { .shots { grid-template-columns: 1fr 1fr 1.6fr; } }
.shot { margin: 0; }
.shot img { margin: 0 auto 12px; }
.shot.phone img { width: min(260px, 70vw); border-radius: 26px; border: 8px solid #10182b; box-shadow: var(--shadow); }
.shot.wide img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.shot figcaption { text-align: center; color: var(--ink-soft); font-size: .95rem; }
.shot figcaption b { color: var(--ink); }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
details p { color: var(--ink-soft); }
.prose h2 { margin-top: 32px; }
.prose ul, .ticks, .links { padding-left: 22px; margin: 0 0 14px; }
.prose li, .ticks li, .links li { margin: 6px 0; }
.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.note { background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; font-size: .95rem; }
.note.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); min-width: 140px; }
th { background: var(--bg); }
.plan { border: 2px solid var(--brand); border-radius: 18px; padding: 24px; margin-bottom: 28px; box-shadow: var(--shadow); }
.price { font-size: 2.2rem; font-weight: 700; margin: 0 0 12px; }
.price small { font-size: 1rem; font-weight: 400; color: var(--ink-soft); }
.band { background: var(--brand); color: #fff; text-align: center; }
.band h2 { color: #fff; }
.band p { color: #e6edff; }
.band .actions { justify-content: center; }
.band .btn.primary { background: #fff; color: var(--brand-dark); border-color: #fff; }
.band .btn:not(.primary) { background: transparent; color: #fff; border-color: #c9d8ff; }

/* ฟอร์ม */
.lead-form { display: grid; gap: 14px; max-width: 560px; }
.lead-form label { display: grid; gap: 6px; font-weight: 600; }
.lead-form input, .lead-form select, .lead-form textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus, .btn:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lead-form .check { display: flex; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 400; }
.lead-form .check input { width: 20px; min-height: 20px; height: 20px; flex: none; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.4em; margin: 0; font-weight: 600; }
.form-msg.ok { color: var(--ok); }
.form-msg.bad { color: var(--bad); }

/* ส่วนท้าย */
.site-foot { background: #10182b; color: #c9d1e4; padding: 40px 0 20px; font-size: .95rem; }
.site-foot a { color: #e6edff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot h2 { font-size: 1rem; color: #fff; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 8px 0; }
.site-foot .brand { color: #fff; margin-bottom: 10px; }
.site-foot .small { color: #9aa6c2; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.copyright { margin-top: 28px; padding-top: 16px; border-top: 1px solid #263154; color: #9aa6c2; font-size: .85rem; }

/* แถบยินยอมคุกกี้ + กล่องตั้งค่า (web/consent.js ใช้ร่วมกับแอป) — สามปุ่มหน้าตาและขนาดเท่ากัน */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(20, 28, 48, .10); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center;
}
.consent-text { flex: 1 1 320px; max-width: 720px; font-size: .92rem; }
.consent-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1 1 420px; max-width: 560px; }
@media (max-width: 520px) { .consent-actions { grid-template-columns: 1fr; } }
.consent-btn { width: 100%; min-height: 44px; padding-left: 8px; padding-right: 8px; background: var(--card); border: 1.5px solid var(--ink); color: var(--ink); font-weight: 600; }
.consent-btn:hover { background: var(--bg); }
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(20, 28, 48, .45); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--card); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 20px; max-height: 90vh; overflow-y: auto; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 16px; } .modal { border-radius: 18px; } }
.modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }
.consent-modal h2 { margin-top: 0; }
.consent-cat { border-top: 1px solid var(--line); padding: 10px 0; }
.consent-cat p { margin: 4px 0 0 30px; font-size: .9rem; }
.consent-switch { display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.consent-switch input { width: 20px; height: 20px; flex: none; }
