/* ─────────────────────────────────────────────────────────────────────
   SBBOT-Flow — หน้าเว็บแนะนำโปรแกรม
   โทเคนสีชุดเดียวกับตัวโปรแกรม (web/style.css) เพื่อให้เว็บกับแอปดูเป็นแบรนด์เดียวกัน
   หน้านี้ตั้งใจให้เป็นธีมมืดอย่างเดียว ไม่มีโหมดสว่าง — เหมือนตัวแอป
   ───────────────────────────────────────────────────────────────────── */

:root {
  /* พื้น/ตัวอักษร */
  --canvas: #050508;
  --black: #0c0a10;
  --surface: #17131f;
  --surface-2: rgba(23, 19, 31, 0.66);
  --border: #4a2a39;
  --border-soft: #35202c;
  --white: #f5f2fa;
  --muted: #a79fb5;          /* สว่างกว่าในแอปเล็กน้อย เพราะเว็บอ่านบนจอหลากหลายกว่า */
  --muted-strong: #cbc4d6;

  /* สีแบรนด์ */
  --red: #ef1746;
  --red-2: #ff4d6d;
  --red-dim: rgba(239, 23, 70, 0.16);
  --success: #22c58b;
  --brand-grad: linear-gradient(120deg, #8a0f24 0%, var(--red) 50%, var(--red-2) 100%);
  --surface-grad: linear-gradient(160deg, rgba(23, 19, 31, 0.86) 0%, rgba(19, 16, 25, 0.86) 100%);

  /* จังหวะช่องไฟ (density 4/10 — โปร่งกำลังดีสำหรับหน้าขาย) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Prompt", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* กันหัวข้อโดนแถบเมนูบนสุดบังตอนกดลิงก์ในหน้า */
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 300;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

::selection { background: var(--red); color: #fff; }

/* โฟกัสต้องเห็นชัดเสมอ — ห้ามลบวงโฟกัสทิ้ง */
:focus-visible {
  outline: 2px solid var(--red-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--red);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* แสงเรืองพื้นหลัง — เลเยอร์นิ่งของตัวเอง วาดครั้งเดียวจบ ไม่ให้เนื้อหาที่ขยับลากไปวาดใหม่ */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% -6%, rgba(239, 23, 70, 0.34) 0%, rgba(150, 8, 32, 0.12) 45%, transparent 68%),
    radial-gradient(circle at -8% 60%, rgba(200, 16, 52, 0.22) 0%, rgba(120, 6, 24, 0.08) 45%, transparent 66%),
    radial-gradient(circle at 78% 96%, rgba(255, 61, 154, 0.18) 0%, transparent 58%),
    radial-gradient(circle at 10% -4%, rgba(139, 61, 255, 0.22) 0%, transparent 52%);
  transform: translateZ(0);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: var(--space-3);
}
.wrap-narrow { max-width: 820px; }

.section { padding-block: var(--space-6); }
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(12, 10, 16, 0.72) 12%, rgba(12, 10, 16, 0.72) 88%, transparent);
}

.sec-head { max-width: 680px; margin: 0 auto var(--space-5); text-align: center; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: var(--space-2); }

.kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-2);
  margin-bottom: var(--space-1);
}

.sec-sub { color: var(--muted); font-size: 17px; }
.sec-sub-left { text-align: start; }
.sec-head .sec-sub { text-align: center; }

.grad {
  background: linear-gradient(100deg, var(--red-2), #ff9ab0 60%, #c78bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── BUTTONS ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;              /* เป้าแตะ ≥ 44px */
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 8px 24px rgba(239, 23, 70, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(239, 23, 70, 0.42);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--white);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--red-2);
  transform: translateY(-2px);
}

.btn-sm { min-height: 42px; padding: 8px 20px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

/* ─── NAV ────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 6, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav.is-stuck {
  border-bottom-color: var(--border-soft);
  background: rgba(8, 6, 11, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  flex: none;
}
.brand img { width: 40px; height: auto; }
.brand-accent { color: var(--red-2); }

.nav-links {
  display: flex;
  gap: var(--space-3);
  margin-inline-start: auto;
  font-size: 15px;
}
.nav-links a {
  color: var(--muted-strong);
  padding: 8px 2px;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 2px;
  background: var(--red-2);
  border-radius: 2px;
  transition: right 0.25s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { right: 0; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: var(--space-2);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--white);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ─── HERO ───────────────────────────────────────────────────────── */

.hero { padding-block: var(--space-6) var(--space-5); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--red-dim);
  color: var(--muted-strong);
  font-size: 14px;
  margin-bottom: var(--space-3);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(34, 197, 139, 0.16);
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: var(--space-3);
  text-wrap: balance;
}

.lead {
  color: var(--muted-strong);
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 54ch;
  margin-bottom: var(--space-4);
}
.lead strong { color: var(--white); font-weight: 500; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { width: 17px; height: 17px; color: var(--success); flex: none; }

/* ─── MOCKUP หน้าตาโปรแกรม (HTML/CSS ล้วน) ───────────────────────── */

.hero-visual { perspective: 1400px; }

.mock {
  background: var(--surface-grad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 130, 160, 0.06) inset;
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform 0.5s var(--ease);
}
.hero-visual:hover .mock { transform: rotateY(-3deg) rotateX(1deg); }

.mock-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-soft);
}
.mock-title { font-size: 12px; color: var(--muted); }
.mock-btns { margin-inline-start: auto; display: flex; gap: 6px; }
.mock-btns i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.mock-btns i.close { background: var(--red); }

.mock-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); min-height: 340px; }

.mock-side {
  padding: 14px 10px;
  border-inline-end: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--muted);
}
.mock-nav b {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  flex: none;
}
.mock-nav.is-active {
  background: var(--red-dim);
  color: var(--white);
  box-shadow: inset 2px 0 0 var(--red);
}
.mock-nav.is-active b { background: var(--red-2); }
.mock-sep {
  height: 1px;
  background: var(--border-soft);
  margin: 6px 4px;
}

.mock-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.mock-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--muted);
}
.chip.is-on {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
}

.mock-prompt {
  position: relative;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mock-line {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}
.w90 { width: 90%; } .w75 { width: 75%; } .w70 { width: 70%; }
.w60 { width: 60%; } .w50 { width: 50%; } .w40 { width: 40%; }
.mock-caret {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 2px;
  height: 12px;
  background: var(--red-2);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.mock-queue { display: flex; flex-direction: column; gap: 8px; }
.mock-q {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  font-size: 10.5px;
  color: var(--muted);
}
.mock-q .mock-line { flex: 1; }
.mock-q em { font-style: normal; flex: none; }
.q-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex: none;
}
.q-dot.done { background: var(--success); }
.q-dot.run {
  background: var(--red-2);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255, 77, 109, 0); }
}

.mock-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; }
.mock-gallery span {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(140deg, rgba(239, 23, 70, 0.2), rgba(139, 61, 255, 0.14));
}
.mock-gallery span:nth-child(2) { background: linear-gradient(140deg, rgba(139, 61, 255, 0.2), rgba(255, 77, 109, 0.14)); }
.mock-gallery span:nth-child(3) { background: linear-gradient(140deg, rgba(34, 197, 139, 0.16), rgba(239, 23, 70, 0.16)); }
.mock-gallery span:nth-child(4) { background: linear-gradient(140deg, rgba(255, 154, 176, 0.18), rgba(74, 157, 255, 0.14)); }

/* ─── STATS ──────────────────────────────────────────────────────── */

.stats { padding-block: var(--space-4); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.stat {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
}
.stat strong {
  display: block;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--red-2);
  margin-bottom: 6px;
}
.stat span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ─── CARDS ──────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3);
}

.card {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-grad);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}
.card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--red-dim);
  border: 1px solid var(--border);
  color: var(--red-2);
  margin-bottom: var(--space-2);
}
.card-ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* ─── STEPS ──────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ─── TOOLS ──────────────────────────────────────────────────────── */

.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-5);
  align-items: center;
}
.tools-copy h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: var(--space-2); }
.tools-copy .sec-sub { margin-bottom: var(--space-4); }

.tool {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-inline-start: 3px solid var(--red);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: var(--space-2);
}
.tool:last-child { margin-bottom: 0; }
.tool-tag {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}
.tool p { color: var(--muted); font-size: 15px; }

.tools-visual { display: flex; justify-content: center; }
.cut-demo {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.cut-shape {
  width: 62%;
  height: 62%;
  border-radius: 42% 58% 55% 45% / 50% 44% 56% 50%;
  background: linear-gradient(140deg, var(--red), #c78bff);
  box-shadow: 0 18px 50px rgba(239, 23, 70, 0.3);
}
.cut-line {
  position: absolute;
  width: 76%;
  height: 76%;
  border-radius: 42% 58% 55% 45% / 50% 44% 56% 50%;
  border: 2px dashed var(--red-2);
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cut-label {
  position: absolute;
  bottom: 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 6, 11, 0.86);
  font-size: 13px;
  color: var(--muted-strong);
}

/* ─── PRICING ────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.plan {
  position: relative;
  padding: var(--space-4) var(--space-3) var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-grad);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.plan-featured {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red-dim), 0 22px 50px rgba(239, 23, 70, 0.18);
}
.plan-badge {
  position: absolute;
  top: -13px;
  inset-inline-start: var(--space-3);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.plan h3 { font-size: 20px; }
.price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--white);
}
.price-cur { font-size: 22px; font-weight: 500; }
.price-num { font-size: 38px; font-weight: 700; line-height: 1.1; }
.price-per { font-size: 15px; color: var(--muted); }
.plan-note { color: var(--muted); font-size: 14px; margin-top: -8px; }
.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--muted-strong);
  padding-block: var(--space-1);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-2);
}
.plan li { position: relative; padding-inline-start: 26px; }
.plan li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 9px;
  width: 14px;
  height: 8px;
  border-inline-start: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; }

/* ราคาเดียว: การ์ดใบเดียวไม่ควรยืดเต็มความกว้าง เลยจำกัดความกว้างแล้วจัดกลาง
   และแบ่งข้างในเป็นสองคอลัมน์ (ราคา | สิ่งที่ได้) ไม่ให้การ์ดสูงเป็นเสา */
.plans-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 780px;
  margin-inline: auto;
}

.plan-solo {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4) var(--space-4) var(--space-4);
}
.plan-solo-head { display: flex; flex-direction: column; gap: var(--space-2); }
.plan-solo-head h3 { font-size: 19px; }
.plan-solo .price { margin-top: -4px; }
.plan-solo .price-num { font-size: 48px; }
.plan-solo .plan-note {
  margin-top: -12px;
  color: var(--muted-strong);
  font-size: 15px;
}
.plan-solo .btn { margin-top: var(--space-1); }
.plan-solo ul {
  border-top: 0;
  border-inline-start: 1px solid var(--border-soft);
  padding-top: 0;
  padding-inline-start: var(--space-3);
}

@media (max-width: 700px) {
  .plan-solo { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .plan-solo ul {
    border-inline-start: 0;
    border-top: 1px solid var(--border-soft);
    padding-inline-start: 0;
    padding-top: var(--space-3);
  }
}

.plans-foot {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: var(--space-3);
}

/* ─── CTA / DOWNLOAD ─────────────────────────────────────────────── */

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(239, 23, 70, 0.22), transparent 60%),
    var(--surface-grad);
}
.cta h2 { font-size: clamp(26px, 3.2vw, 38px); margin-bottom: var(--space-2); }
.cta .hero-cta { margin-bottom: 0; margin-top: var(--space-3); }

.req {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.req > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.req > div:last-child { border-bottom: 0; padding-bottom: 0; }
.req dt { color: var(--muted); font-size: 14px; }
.req dd { margin: 0; font-size: 14px; font-weight: 500; text-align: end; }

/* ─── FAQ ────────────────────────────────────────────────────────── */

.faq { display: flex; flex-direction: column; gap: var(--space-1); }

.faq details {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  transition: border-color 0.2s var(--ease);
}
.faq details[open] { border-color: var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 56px;
  padding: 14px var(--space-3);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-inline-end: 2px solid var(--red-2);
  border-bottom: 2px solid var(--red-2);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq summary:hover { color: var(--red-2); }
.faq-body {
  padding: 0 var(--space-3) var(--space-3);
  color: var(--muted);
  font-size: 15px;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-soft);
  padding-block: var(--space-4) var(--space-3);
  background: rgba(5, 5, 8, 0.7);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: var(--space-3);
}
.footer-brand { max-width: 340px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: 15px;
  color: var(--muted-strong);
}
.footer-links a { padding: 6px 0; }
.footer-links a:hover { color: var(--red-2); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  justify-content: space-between;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 13px;
}

/* ─── MOTION ─────────────────────────────────────────────────────────
   หลักที่ยึด: ขยับแค่ transform กับ opacity เท่านั้น (ไม่แตะ width/height/top
   ซึ่งบังคับให้เบราว์เซอร์คำนวณ layout ใหม่ทุกเฟรม) และเคลื่อนไหวไม่กี่ชิ้นต่อหนึ่งหน้าจอ
   ส่วนที่ขยับตามการเลื่อนหน้าเป็นของประดับล้วน ไม่มีตัวหนังสือให้อ่าน
   ───────────────────────────────────────────────────────────────── */

/* ค่อย ๆ โผล่ตอนเลื่อนถึง — มี 4 ทิศให้เลือกผ่าน data-reveal ไม่ให้ทุกบล็อกลอยขึ้นเหมือนกันหมด */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal[data-reveal="left"]  { transform: translateX(-26px); }
.reveal[data-reveal="right"] { transform: translateX(26px); }
.reveal[data-reveal="zoom"]  { transform: scale(0.94); }
.reveal.is-in { opacity: 1; transform: none; }

/* ฮีโร่: ไล่โผล่ทีละชิ้นตอนโหลดหน้า ไม่ต้องรอเลื่อน */
[data-hero] > * {
  opacity: 0;
  transform: translateY(18px);
  animation: heroIn 0.7s var(--ease) forwards;
}
[data-hero] > *:nth-child(1) { animation-delay: 0.05s; }
[data-hero] > *:nth-child(2) { animation-delay: 0.15s; }
[data-hero] > *:nth-child(3) { animation-delay: 0.25s; }
[data-hero] > *:nth-child(4) { animation-delay: 0.35s; }
[data-hero] > *:nth-child(5) { animation-delay: 0.45s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* หัวเรื่องไล่สีวิ่งช้า ๆ — ใช้ background-position ที่ไม่กระทบ layout */
.grad {
  background: linear-gradient(100deg, var(--red-2), #ff9ab0 35%, #c78bff 70%, var(--red-2));
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradSlide 9s linear infinite;
}
@keyframes gradSlide { to { background-position: 260% 0; } }

/* แถบความคืบหน้าการเลื่อนหน้า อยู่ใต้แถบเมนู */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--brand-grad);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ลิงก์เมนูของหมวดที่กำลังดูอยู่ — ขีดใต้ค้างไว้ */
.nav-links a.is-current { color: var(--white); }
.nav-links a.is-current::after { right: 0; }

/* เลเยอร์ประดับที่ขยับตามการเลื่อนหน้า — JS ตั้งค่าผ่านตัวแปร --py ไม่ใช่เขียนทับ transform
   ตรง ๆ ไม่งั้นจะไปทับ transform ของอนิเมชั่นตอนโผล่จนเอฟเฟกต์นั้นหายไป */
.glow, .hero-visual, .tools-visual { will-change: transform; }
.hero-visual.is-in,
.tools-visual.is-in { transform: translate3d(0, var(--py, 0px), 0); }

/* ปุ่ม: ไอคอนขยับบอกทิศทางตอนชี้ */
.btn:hover svg { transform: translateY(2px); }
.btn svg { transition: transform 0.25s var(--ease); }
.btn:active { transform: translateY(0) scale(0.98); }

/* การ์ด: ไอคอนเด้งเล็กน้อย + แสงกวาดผ่านตอนชี้ */
.card { position: relative; overflow: hidden; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 130, 160, 0.09) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}
.card:hover::after { transform: translateX(100%); }
.card-ico { transition: transform 0.35s var(--ease), color 0.35s var(--ease); }
.card:hover .card-ico { transform: translateY(-3px) scale(1.06); color: var(--white); }

/* ขั้นตอน: เลขวงกลมหมุนเข้าที่ตอนโผล่ */
.step-no { transition: transform 0.5s var(--ease); }
.step.is-in .step-no { animation: stepPop 0.6s var(--ease) 0.15s backwards; }
@keyframes stepPop {
  from { transform: scale(0.4) rotate(-25deg); opacity: 0; }
}

/* เส้นตัดไดคัท: หมุนช้า + ค่อย ๆ หายใจ ให้ดูเหมือนเส้นกำลังคำนวณอยู่ */
.cut-shape { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

/* เมนูมือถือ: เลื่อนลงมา ไม่ใช่โผล่พรวด */
@media (max-width: 760px) {
  .nav-links.is-open { animation: menuDrop 0.28s var(--ease); }
  @keyframes menuDrop {
    from { opacity: 0; transform: translateY(-10px); }
  }
}

/* FAQ: ความสูงถูกอนิเมตจาก JS (details เปิด/ปิดแบบกระตุกโดยธรรมชาติ) */
.faq details.is-animating { overflow: hidden; }
.faq details[open] .faq-body { animation: faqIn 0.3s var(--ease); }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid,
  .tools-grid,
  .cta { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; }
  .mock { transform: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { padding: var(--space-4) var(--space-3); }
}

@media (max-width: 760px) {
  :root { --space-6: 64px; --space-5: 48px; }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: var(--space-1) var(--space-3) var(--space-3);
    background: rgba(8, 6, 11, 0.98);
    border-bottom: 1px solid var(--border-soft);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-links a::after { display: none; }

  .hero { padding-top: var(--space-4); }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .mock-body { grid-template-columns: 108px minmax(0, 1fr); }
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .req > div { flex-direction: column; gap: 2px; }
  .req dd { text-align: start; }
  .footer-bottom { flex-direction: column; }
}

/* เคารพการตั้งค่าลดการเคลื่อนไหวของระบบ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
