/* DRFX หน้าแรก — Black-Gold */
:root {
  --bg: #070d1a; --bg2: #050a14; --panel: #0e1729; --panel2: #162238; --line: #263650; --line2: #3a4d6d; --rule: #1c2b45;
  --ink: #f3efe6; --ink2: #c9cfda; --mute: #8e9bb3; --gold: #d9b66a; --gold2: #ecca82; --gold-d: #b8923f; --green: #2ed38d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 Sarabun, 'Noto Sans Thai', sans-serif; }
img { max-width: 100%; }
a { color: var(--gold); }
a:hover { color: var(--gold2); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1306; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.gold { color: var(--gold); }
.muted { color: var(--mute); }
.small { font-size: 13px; margin: 10px 4px 0; }
.eyebrow { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 12px; }
.h2 { font-family: Kanit, sans-serif; font-weight: 600; font-size: 40px; line-height: 1.2; margin: 0; }
.h2--sm { font-size: 32px; }
.lead { font-size: 18px; color: var(--ink2); margin: 12px 0 0; max-width: 680px; }
.num { font-family: Kanit, sans-serif; font-size: 36px; font-weight: 600; line-height: 1.1; }
.num--sm { font-size: 22px; padding-top: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line2); color: var(--ink2); }
.chip--gold { border-color: var(--gold); color: var(--gold); }
.chip--green { border-color: var(--green); color: #7ff0bd; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 700 16px Sarabun, sans-serif; text-decoration: none; border: 1px solid transparent; cursor: pointer; text-align: center; }
.btn-gold { background: var(--gold); color: #1a1306; }
.btn-gold:hover { background: var(--gold2); color: #1a1306; }
.btn-line { border-color: var(--line2); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--gold); color: var(--ink); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 22px; }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
.row-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.row-btns--c { justify-content: center; }

/* header */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--rule); background: rgba(7,13,26,.92); backdrop-filter: blur(8px); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { font-family: Kanit, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: .04em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--gold); }
.brand--sm { font-size: 18px; }
.nav { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--ink2); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.top__act { display: flex; gap: 10px; align-items: center; }
.lang { display: inline-flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; }
.lang button { min-height: 40px; min-width: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--ink2); font: 600 14px Sarabun, sans-serif; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--gold); color: #1a1306; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 12px; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.only-sm { display: none; }
.burger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

/* sections */
.sec { padding: 56px 0; }
.sec--line { border-top: 1px solid var(--rule); }
.sec--hero { padding: 48px 0 24px; }
.sec--stats { padding: 8px 0 48px; }
.hero__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.hero__txt { max-width: 720px; }
h1 { font-family: Kanit, sans-serif; font-weight: 700; font-size: 52px; line-height: 1.12; margin: 0; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 24px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }

/* bots */
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 28px; }
.tab { text-align: left; padding: 18px 22px; cursor: pointer; color: var(--ink); font-family: inherit; }
.tab[aria-selected="true"] { border-color: var(--gold); background: var(--panel2); }
.tab__t { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tab__t b { font-family: Kanit, sans-serif; font-size: 21px; font-weight: 600; }
.tab__n { font-size: 14px; color: var(--mute); }
.tab[aria-selected="true"] .tab__n { color: var(--gold); }
.tab__d { font-size: 14px; color: var(--mute); }
.catnote { margin: 18px 0 0; color: var(--ink2); }
.catnote--box { padding: 16px 20px; background: var(--panel2); border-color: var(--line2); }
.subs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.sub { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font: 600 15px Sarabun, sans-serif; cursor: pointer; }
.sub[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1306; }
.sub:disabled { color: #5c6a83; cursor: default; }
.catsec { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--rule); }
.catsec:first-child { border-top: 0; padding-top: 0; }
.catsec__h { font-family: Kanit, sans-serif; font-size: 28px; font-weight: 600; margin: 0; }
.catsec__d { margin: 2px 0 0; }
.grp { margin-top: 32px; }
.grp__h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.grp__h h3 { font-family: Kanit, sans-serif; font-size: 22px; margin: 0; color: var(--gold); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-top: 32px; }
.grp .grid3 { margin-top: 0; }
.bot { overflow: hidden; display: flex; flex-direction: column; }
.bot--hot { border-color: var(--gold-d); }
.bot__img { position: relative; height: 230px; background: radial-gradient(120% 90% at 50% 20%, #1d2a48 0%, #0b1324 70%); overflow: hidden; }
.bot__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.bot__b { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.bot__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.bot h4 { font-family: Kanit, sans-serif; font-size: 22px; margin: 10px 0 0; }
.bot h4 small { color: var(--mute); font-size: 14px; font-weight: 400; }
.bot__d { margin: 4px 0 0; color: var(--ink2); font-size: 15px; }
.bot__x { margin: 8px 0 0; font-size: 14px; color: var(--gold); }
.bot__m { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; font-size: 14px; }
.bot__m span { display: block; color: var(--mute); font-size: 13px; }
.bot__btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }
.bot--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; }
.bot--wide .bot__img { height: 100%; min-height: 320px; }
.bot--wide .bot__b { padding: 28px; }
.bot--wide h4 { font-size: 30px; }
.bot--wide .bot__m { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.note { margin-top: 32px; padding: 14px 18px; background: #101b30; border-color: var(--line2); font-size: 15px; color: var(--ink2); }

/* quiz */
.quiz { padding: 40px; background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.quiz__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; margin-top: 24px; }
.quiz__form { display: flex; flex-direction: column; gap: 20px; }
.quiz fieldset { border: 0; padding: 0; margin: 0; }
.quiz legend { font-weight: 700; margin-bottom: 10px; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line2); font-size: 15px; }
.opt:has(input:checked) { border-color: var(--gold); background: #2a2414; }
.opt input { accent-color: var(--gold); }
.quiz__res { align-self: start; }
.res { padding: 26px; border-color: var(--gold); }
.res--empty { border-style: dashed; color: var(--mute); border-color: var(--line); }
.res__top { display: flex; gap: 14px; align-items: center; }
.res__top img { width: 76px; height: 76px; object-fit: cover; object-position: 50% 10%; border-radius: 14px; background: #1d2a48; }
.res__name { font-family: Kanit, sans-serif; font-size: 26px; font-weight: 600; }
.res ul { margin: 0; padding-left: 20px; color: var(--ink2); display: flex; flex-direction: column; gap: 6px; }

/* steps, plans, cta, footer */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.step { padding: 24px; }
.step h3 { margin: 8px 0 4px; font-size: 19px; }
.step p { margin: 0; }
.plan { padding: 28px; }
.plan h3 { font-family: Kanit, sans-serif; font-size: 24px; margin: 0; }
.plan p { margin: 6px 0 0; }
.plan .num { margin-top: 18px; }
.plan--hot { border-color: var(--gold); }
.unit { font-size: 18px; }
.cta { padding: 44px; text-align: center; border-color: var(--gold-d); background: radial-gradient(80% 120% at 50% 0%, #2a2414 0%, var(--panel) 70%); }
.cta .lead { margin-left: auto; margin-right: auto; }
.foot { border-top: 1px solid var(--rule); padding: 40px 0 32px; background: var(--bg2); }
.foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 28px; }
.foot__h { font-weight: 700; margin-bottom: 8px; }
.foot a { display: block; color: var(--ink2); text-decoration: none; font-size: 15px; padding: 2px 0; }
.foot a:hover { color: var(--ink); }
.foot__warn { margin-top: 28px; }

@media (max-width: 1100px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 8px 32px 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--rule); }
  .burger { display: inline-flex; }
  .top__in { justify-content: space-between; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 18px; }
  h1 { font-size: 34px; }
  .h2 { font-size: 28px; }
  .h2--sm { font-size: 24px; }
  .lead { font-size: 16px; }
  .sec { padding: 40px 0; }
  .sec--hero { padding: 28px 0 16px; }
  .sec--stats { padding: 0 0 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .num { font-size: 28px; }
  .hide-sm { display: none; }
  .nav .only-sm { display: block; }
  .bot--wide { grid-template-columns: 1fr; }
  .bot--wide .bot__img { min-height: 260px; }
  .bot--wide .bot__m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz, .cta { padding: 24px 18px; }
  .nav { padding: 8px 18px 16px; }
  .brand { font-size: 17px; }
  .top__act { gap: 6px; }
}

/* การ์ดบอทแบบย่อ (แบบร้านค้า) */
.pg { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.pc { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.pc:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.pc--hot { border-color: var(--gold-d); }
.pc__img { position: relative; aspect-ratio: 1 / 1; background: radial-gradient(110% 90% at 50% 20%, #24345a, #0b1324 72%); overflow: hidden; }
.pc__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.pc__tag { position: absolute; left: 6px; top: 6px; background: var(--gold); color: #1a1306; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.pc__tag--g { left: auto; right: 6px; background: var(--green); color: #062016; }
.pc__b { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pc__n { font-family: Kanit, sans-serif; font-weight: 600; font-size: 15px; line-height: 1.25; }
.pc__n small { color: var(--mute); font: 400 11px Sarabun, sans-serif; }
.pc__d { font-size: 12.5px; line-height: 1.4; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc__f { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-top: auto; padding-top: 5px; }
.pc__p { color: var(--gold); font-weight: 700; font-size: 13.5px; }
.pc__p small { font-weight: 400; color: var(--mute); }
.pc__m { font-size: 11px; color: var(--mute); white-space: nowrap; }
@media (max-width: 560px) {
  .pg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pc__d { font-size: 12px; }
  .pc__m { display: none; }
}
