/* พรรคเอดีบีเคเค — แลนดิ้งเพจ 999
   แนวทาง: editorial เรียบหรู น้ำเงินกรมท่าเข้มบนพื้นขาวนวล ใช้เส้นบางแทนกล่อง
   สีรุ้งจากโลโก้ใช้เป็นลายเซ็นจุดเดียว (เส้นสเปกตรัม 4px) */

:root {
  --paper: #f5f2ec;
  --surface: #fbfaf7;
  --ink: #0e1a33;
  --muted: #4d566b;
  --hair: rgba(14, 26, 51, .14);
  --navy: #14275c;
  --navy-hover: #0d1b45;
  --night: #0b1631;
  --night-ink: #eef1f7;
  --night-muted: #aab4ca;
  --line-green: #06c755;

  --spectrum: linear-gradient(90deg, #e8344e, #f28a1a, #f5d21a, #27c46a, #1aa8e8, #3a55e0, #9a3ae0, #e8344e);

  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px;
  --header-h: 64px;
  --dock-h: 0px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: var(--dock-h);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { list-style: none; margin: 0; padding: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid #3a55e0; outline-offset: 3px; border-radius: 4px; }

/* ---------- ไอคอน (Lucide เส้น 1.5px ทั้งเว็บ) ---------- */
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 28px; height: 28px; }
.brand-ico { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 17px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .16s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary .brand-ico { color: var(--line-green); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn-ghost .brand-ico { color: var(--line-green); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--navy-hover); }
  .btn-ghost:hover { background: rgba(14, 26, 51, .05); }
}

.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; min-height: 44px; }
.link-more .ico { transition: transform .2s var(--ease); }
.link-more:hover .ico { transform: translateX(3px); }

.kicker { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; font-variant-numeric: tabular-nums; }

/* ---------- หัวเว็บ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 242, 236, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.header-row { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; min-height: 48px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.4; }
.brand-text strong { font-size: 16px; white-space: nowrap; }
.brand-text small { font-size: 14px; letter-spacing: .14em; color: var(--muted); font-weight: 600; line-height: 1.2; }
.nav { display: none; gap: 4px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 14px; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }

/* ---------- แบนเนอร์ ---------- */
.hero { position: relative; display: grid; isolation: isolate; overflow: hidden; background: var(--night); }
.hero-media { grid-area: 1 / 1; position: relative; height: min(70svh, 640px); min-height: 480px; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  /* จุดโฟกัส: โคมวงล้อสี + เสื้อพรรคกลางร้าน */
  object-position: 64% 24%;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.hero-copy { grid-area: 1 / 1; align-self: end; position: relative; color: #fff; padding: 120px 0 32px;
  background: linear-gradient(to top, rgba(11, 22, 49, .94) 0%, rgba(11, 22, 49, .74) 50%, rgba(11, 22, 49, 0) 100%); }
.hero-inner { padding: 0 var(--gutter); max-width: 620px; }
.hero h1 { display: flex; flex-direction: column; gap: 6px; }
.h1-name { font-size: 16px; font-weight: 600; letter-spacing: .04em; opacity: .85; }
.h1-slogan { font-size: clamp(36px, 10vw, 64px); line-height: 1.3; letter-spacing: -.015em; }
.lead { margin-top: 14px; font-size: 17px; line-height: 1.65; opacity: .9; max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 24px; }
.hero .btn-primary { background: #fff; color: var(--navy); }
.hero .link-more { color: #fff; }
.hero-meta { display: none; }
.spectrum { grid-area: 2 / 1 / 3 / -1; height: 4px; background: var(--spectrum); }

@media (min-width: 1024px) {
  .hero { grid-template-columns: 1fr 1fr; background: var(--paper); }
  .hero-media { grid-area: 1 / 2; height: min(84vh, 800px); min-height: 600px; }
  .hero-copy { grid-area: 1 / 1; align-self: stretch; display: flex; align-items: center; color: var(--ink); background: none; padding: 72px 0; }
  .hero-inner { margin-left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); padding: 0 56px 0 0; max-width: 640px; }
  .h1-name { font-size: 18px; color: var(--muted); opacity: 1; }
  .h1-slogan { font-size: 64px; }
  .lead { font-size: 19px; color: var(--muted); opacity: 1; }
  .hero .btn-primary { background: var(--navy); color: #fff; }
  .hero .link-more { color: var(--navy); }
  .hero-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hair); max-width: 460px; }
  .hero-meta dt { font-size: 14px; color: var(--muted); }
  .hero-meta dd { font-weight: 600; }
}

/* ---------- ส่วนเนื้อหา ---------- */
.section { padding: 72px 0; }
.section h2 { font-size: clamp(28px, 6.6vw, 48px); letter-spacing: -.01em; }
.section-head { margin-bottom: 36px; max-width: 40em; }
.section-head > p:not(.kicker) { margin-top: 12px; color: var(--muted); }
@media (min-width: 768px) {
  .section-head-split { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
  .section-head-split > p { margin-top: 0; max-width: 28em; }
}
@media (min-width: 1024px) { .section { padding: 128px 0; } .section-head { margin-bottom: 56px; } }

/* จุดยืน: 2 / 3 / 4 / 4 คอลัมน์ เส้นบางด้านบนแทนกล่องสี */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 12px; }
.feature { border-top: 1px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.feature .ico-lg { color: var(--navy); }
.feature h3 { font-size: 18px; margin-top: 8px; }
.feature p { font-size: 15px; line-height: 1.65; color: var(--muted); }
@media (min-width: 480px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; } .feature h3 { font-size: 20px; } .feature p { font-size: 16px; } }

/* เกี่ยวกับ: ข้อความใหญ่แบบ statement */
.section-about { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.about-grid { display: grid; gap: 32px; align-items: center; }
.about-mark { width: 120px; }
.about-mark img { width: 100%; border-radius: 22%; }
.section .statement { line-height: 1.4; margin-bottom: 20px; }
.about-copy > p:last-child { font-size: 18px; color: var(--muted); max-width: 36em; }
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 4fr 8fr; gap: 64px; }
  .about-mark { width: 100%; max-width: 300px; }
}

/* ขั้นตอน */
.step-grid { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.step { padding: 28px 0; border-bottom: 1px solid var(--hair); display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; }
.step-no { grid-row: 1 / 3; font-size: 32px; font-weight: 400; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 20px; }
.step p { color: var(--muted); margin-top: 4px; }
.steps-cta { margin-top: 40px; }
@media (min-width: 768px) {
  .step-grid { grid-template-columns: repeat(3, 1fr); border-top: 0; gap: 32px; }
  .step { display: block; border-bottom: 0; border-top: 1px solid var(--ink); padding: 24px 0 0; }
  .step-no { display: block; font-size: 56px; line-height: 1.1; margin-bottom: 28px; }
  .step h3 { font-size: 22px; }
}

/* แกลเลอรี (โซนเข้ม): ไม่ครอป ใช้สัดส่วนจริงของไฟล์ */
.section-dark { background: var(--night); color: var(--night-ink); }
.section-dark .kicker, .section-dark .section-head > p:not(.kicker) { color: var(--night-muted); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: start; }
.g-item { margin: 0; }
.g-item img, .g-item video { width: 100%; height: auto; border-radius: var(--radius); background: #050b1c; }
.g-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.g-open img { transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .g-open:hover img { transform: scale(1.02); } }
.g-item figcaption { margin-top: 10px; font-size: 15px; color: var(--night-muted); }
@media (min-width: 1024px) {
  .gallery-layout { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
  .gallery-layout .section-head { margin-bottom: 0; }
  .gallery { gap: 20px; }
  .g-item:nth-child(2) { margin-top: 64px; }
}

/* ติดต่อ */
.contact-layout { display: grid; gap: 40px; }
.contact-lead > p:not(.kicker) { margin: 12px 0 28px; color: var(--muted); }
.contact-list { border-top: 1px solid var(--ink); }
.contact-list > li { border-bottom: 1px solid var(--hair); }
.c-row { display: grid; grid-template-columns: 24px 1fr auto; column-gap: 16px; align-items: center; padding: 18px 0; min-height: 76px; text-decoration: none; }
.c-row > .ico:first-child { color: var(--navy); grid-row: 1 / 3; }
.c-label { font-size: 14px; color: var(--muted); line-height: 1.4; }
.c-value { grid-column: 2; font-size: 18px; font-weight: 600; line-height: 1.45; }
.c-go { grid-column: 3; grid-row: 1 / 3; color: var(--muted); transition: transform .2s var(--ease), color .2s; }
a.c-row:hover .c-go { transform: translateX(3px); color: var(--ink); }
.social { padding: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.social-list { display: flex; flex-wrap: wrap; gap: 8px; }
.social-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hair); font-weight: 600; font-size: 15px; text-decoration: none; }
.social-chip small { font-size: 14px; font-weight: 400; color: var(--muted); }
a.social-chip:hover { background: rgba(14, 26, 51, .05); }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; } }

/* ท้ายหน้า */
.site-footer { background: var(--night); color: var(--night-muted); padding: 40px 0; font-size: 15px; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--spectrum); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 24px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 44px; height: 44px; border-radius: 10px; }
.footer-name { font-size: 17px; font-weight: 700; color: #fff; }
.footer-name span { font-size: 14px; letter-spacing: .12em; font-weight: 600; color: var(--night-muted); margin-left: 6px; }
.site-footer a { display: inline-block; padding: 12px 0; margin: -12px 0; color: #fff; }

/* ปุ่มลอยล่างจอ (มือถือ): ไลน์ + โทร */
.dock { display: none; }
@media (max-width: 767px) {
  :root { --dock-h: calc(76px + env(safe-area-inset-bottom)); }
  .dock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(245, 242, 236, .94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--hair); }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 999px; font-weight: 600; text-decoration: none; }
  .dock-line { background: var(--navy); color: #fff; }
  .dock-line .brand-ico { color: var(--line-green); }
  .dock-call { color: var(--navy); border: 1px solid var(--navy); }
  .header-row .btn-ghost span { display: none; }
  .header-row .btn-ghost { width: 44px; padding: 0; }
}
@media (min-width: 768px) { .nav { display: flex; } }
@media (max-width: 359px) { .brand-text small { display: none; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100svh; width: 100vw; height: 100svh; margin: 0; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(5, 11, 28, .92); }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100svh - 96px); width: auto; height: auto; border-radius: var(--radius); }
.lb-close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }

/* ---------- อนิเมชัน: ปรากฏตอนเลื่อนถึง (เล่นครั้งเดียว) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-img { transform: none; }
}
