/* ═══════════════════════════════════════════════════════
   น้องแก้ม Landing — สีตาม BRAND_GUIDE.md เป๊ะ ห้ามเปลี่ยน
   Display: Mitr (ปลายมนรับกับแก้มกลมของมาสคอต)
   Body: Sarabun (ฟอนต์เดียวกับเอกสาร PDF ของ product)
   ═══════════════════════════════════════════════════════ */
:root {
  --ivory: #FFF6E9;
  --cream: #F5E5CC;
  --cocoa: #5A321F;
  --sky: #8CC9EA;
  --sky-deep: #4F9DCE;
  --sky-action: #2C739F;
  --sky-soft: #EAF6FC;
  --caramel: #D98A32;
  --butter: #F6C963;
  --success: #4F9A72;
  --danger: #C85D55;
  --line-green: #06C755;

  --font-display: "Mitr", "Sarabun", sans-serif;
  --font-body: "Sarabun", sans-serif;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(90, 50, 31, 0.10);
  --maxw: 1080px;
  --pricing-maxw: 1320px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.25rem;          /* ตัวใหญ่เพื่อผู้สูงอายุ — ห้ามต่ำกว่านี้ */
  line-height: 1.9;
  color: var(--cocoa);
  background: var(--ivory);
  overflow-x: hidden;
}

/* ── การตัดบรรทัดภาษาไทย ─────────────────────────────────
   ไทยไม่มีช่องว่างระหว่างคำ เบราว์เซอร์จึงตัดกลางคำได้ ("ผู้ช่วย" → "ผู้" / "ช่วย")
   keep-all ห้ามตัดกลางคำ, balance/pretty เกลี่ยความยาวบรรทัดให้สวย */
h1, h2, h3, .hero-sub, .section-lead, .plan-pitch, .btn-primary,
.site-nav a, .footer-head, .founding-banner__title, .step h3, .feature h3 {
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}
p, li, dt, dd, summary { text-wrap: pretty; }
/* keep-all ข้างบนช่วยได้ใน Safari/Firefox แต่ Chrome ยังตัดคำไทยกลางคำอยู่ —
   ครอบคำที่ห้ามตัดด้วย .nb เพื่อบังคับให้ขึ้นบรรทัดใหม่ที่ช่องว่างเท่านั้น */
.nb { white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.35; }

/* หัวข้อที่ลิงก์เมนูกระโดดไปหา ต้องไม่โดนแถบเมนูบังหัว */
#features, #pricing, #faq { scroll-margin-top: 88px; }

/* ═══════════════ HEADER (แถบเมนูติดบนจอ) ═══════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 246, 233, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(90, 50, 31, 0.10);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--cocoa);
  text-decoration: none;
  white-space: nowrap;
}
.site-brand img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.site-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 1.05rem;
  color: var(--cocoa);
  text-decoration: none;
}
.site-nav a:hover { background: var(--cream); }
.site-nav a:focus-visible,
.site-brand:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }
.btn-nav { font-size: 1.05rem; padding: 12px 26px; box-shadow: 0 4px 0 #1F5878; white-space: nowrap; }
.btn-nav:hover { box-shadow: 0 6px 0 #1F5878; }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 10px;
  color: #fff;
  background: var(--cocoa);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-150%);
}
.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }
.container-pricing { max-width: var(--pricing-maxw); }

.section { padding: 96px 0; }
.section h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); text-align: center; }
.section-lead { text-align: center; margin-top: 12px; opacity: 0.85; }

/* ── ปุ่ม ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  color: #fff;
  background: var(--sky-action);
  padding: 18px 44px;               /* พื้นที่กดใหญ่ แตะง่าย ไม่ต้องเล็ง */
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 0 #1F5878;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #1F5878; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #1F5878; }
.btn-primary:focus-visible { outline: 4px solid var(--caramel); outline-offset: 3px; }

/* ═══════════════ 1. HERO ═══════════════ */
.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  top: -220px; right: -260px;
  width: 720px; height: 720px;
  background: var(--sky);
  opacity: 0.35;
  border-radius: 47% 53% 58% 42% / 46% 44% 56% 54%;
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
}
.hero-promise {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--caramel);
  margin-bottom: 4px;
}
/* line-height เผื่อสระบน-ล่างของไทย ไม่ให้บรรทัดชนกัน */
.hero h1 { font-size: clamp(2.1rem, 6.4vw, 4.4rem); line-height: 1.3; margin-bottom: 4px; }
.hero-sub { font-size: 1.35rem; line-height: 1.75; margin-top: 16px; max-width: 30ch; }
.cta-group { margin-top: 36px; }
.cta-note { font-size: 1.05rem; opacity: 0.7; margin-top: 14px; }
.user-proof {
  display: grid;
  grid-template-columns: 1fr;      /* เรียงเป็นแถว ไม่ใช่คอลัมน์ข้างกัน — รองรับ 3 สถิติขึ้นไป */
  width: min(100%, 380px);
  margin-top: 24px;
  font-family: var(--font-display);
}
.user-proof > div { min-width: 0; padding: 10px 0; }
.user-proof > div + div { border-top: 1px solid rgba(90, 50, 31, 0.24); }
.user-proof dd { font-size: 1.7rem; font-weight: 600; line-height: 1.2; }
.user-proof dt { margin-top: 4px; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.45; }

/* เวทีมาสคอต + โน้ตลอยเข้าแก้ม (signature ของหน้า) */
.hero-stage { position: relative; min-height: 420px; }
.hero-mascot-wrap {
  position: relative;
  width: min(420px, 88%);
  margin: 0 auto;
  animation: idle-bob 4.5s ease-in-out infinite;
}
.hero-mascot { border-radius: 50%; box-shadow: var(--shadow); }

@keyframes idle-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(-1deg); }
}

/* โน้ตที่ลอยเข้าหาแก้ม */
.chip {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1rem;
  background: #FFFDF6;
  color: var(--cocoa);
  border: 2px solid var(--butter);
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(90, 50, 31, 0.12);
  white-space: nowrap;
  opacity: 0;
}
.chip-1 { top: 6%;  left: -4%;  animation: fly-right 7s ease-in-out infinite 0s; }
.chip-2 { top: 30%; right: -6%; animation: fly-left  7s ease-in-out infinite 1.8s; }
.chip-3 { bottom: 18%; left: -8%; animation: fly-right 7s ease-in-out infinite 3.5s; }
.chip-4 { top: 62%; right: -2%; animation: fly-left  7s ease-in-out infinite 5.2s; }

/* ลอยเข้าไปหาแก้ม (กลางเวที) แล้วหดหาย = แก้มเก็บแล้ว */
@keyframes fly-right {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  12%  { opacity: 1; }
  55%  { opacity: 1; transform: translate(90px, 30px) scale(0.95); }
  70%  { opacity: 0; transform: translate(150px, 45px) scale(0.4); }
  100% { opacity: 0; transform: translate(150px, 45px) scale(0.4); }
}
@keyframes fly-left {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  12%  { opacity: 1; }
  55%  { opacity: 1; transform: translate(-90px, 20px) scale(0.95); }
  70%  { opacity: 0; transform: translate(-150px, 35px) scale(0.4); }
  100% { opacity: 0; transform: translate(-150px, 35px) scale(0.4); }
}

/* เครื่องหมายสำเร็จเด้งข้างแก้มตอนโน้ตถูกเก็บ */
.cheek-check {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  box-shadow: 0 4px 10px rgba(79, 154, 114, 0.4);
}
.cheek-check-left  { left: 2%;  top: 52%; animation: check-pop 7s ease-out infinite 4.2s; }
.cheek-check-right { right: 2%; top: 48%; animation: check-pop 7s ease-out infinite 2.5s; }

@keyframes check-pop {
  0%, 60%  { opacity: 0; transform: scale(0.3); }
  66%      { opacity: 1; transform: scale(1.15); }
  72%      { opacity: 1; transform: scale(1); }
  85%, 100%{ opacity: 0; transform: scale(0.8); }
}

/* ═══════════════ 2. STEPS ═══════════════ */
.section-steps { background: var(--cream); border-radius: 60px 60px 0 0; }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.step {
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.step-num {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 600;
  color: var(--caramel);
  line-height: 1;
  display: block;
}
.step h3 { font-size: 1.5rem; margin: 10px 0 18px; }
.step p { font-size: 1.1rem; }

/* mockup แชท LINE ขนาดจิ๋วในการ์ดขั้นตอน */
.mini-chat {
  background: var(--sky-soft);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
}
.step-line-mark {
  align-self: center;
  min-width: 96px;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--line-green);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}
.bubble {
  font-size: 1.02rem;
  line-height: 1.6;
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 90%;
}
.bubble-user {
  align-self: flex-end;
  background: var(--line-green);   /* เขียว LINE ของจริง — ให้คนดูรู้ทันทีว่านี่คือ LINE */
  color: #183122;
  border-bottom-right-radius: 4px;
}
.bubble-bot {
  align-self: flex-start;
  background: #fff;
  color: var(--cocoa);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ═══════════════ 3. FEATURES (ท่าทางแก้ม) ═══════════════ */
.section-features { background: var(--cream); }
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.feature {
  background: var(--ivory);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  padding-bottom: 26px;
  transition: transform 0.25s ease;
}
.feature:hover { transform: translateY(-6px); }
.feature-art {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #FFF3E3;
}
.feature-art img { width: 100%; height: 100%; object-fit: contain; }
.feature h3 { font-size: 1.35rem; margin: 18px 16px 6px; }
.feature p { font-size: 1.05rem; margin: 0 20px; line-height: 1.7; }

/* ═══════════════ 4. DEMO CHAT ═══════════════ */
.phone {
  max-width: 430px;
  margin: 48px auto 0;
  background: var(--sky-soft);
  border: 10px solid var(--cocoa);
  border-radius: 42px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.phone-top {
  background: var(--cocoa);
  color: var(--ivory);
  text-align: center;
  padding: 12px 0 16px;
}
.phone-name { font-family: var(--font-display); font-size: 1.15rem; }
.chat-area {
  padding: 20px 16px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 420px;
}
.chat-area .bubble { font-size: 1.05rem; }

/* การ์ดยืนยันหน้าตาเหมือน Flex card ใน LINE จริง */
.confirm-card {
  align-self: flex-start;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  max-width: 92%;
  overflow: hidden;
  animation: card-in 0.35s ease-out;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.confirm-card .card-head {
  font-family: var(--font-display);
  font-size: 1.1rem;
  padding: 14px 18px 4px;
}
.confirm-card .card-detail {
  font-size: 1rem;
  padding: 0 18px 12px;
  color: #7C695B;
}
.confirm-card .card-btn {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  color: var(--sky-action);
  border-top: 1px solid #EFE6D8;
  padding: 12px;
}
.typing {
  align-self: flex-start;
  background: #fff;
  border-radius: 18px;
  padding: 14px 20px;
  display: flex; gap: 6px;
}
.typing span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--sky-deep);
  animation: blink 1s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px 20px;
  background: #fff;
}
.suggestion {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--sky-action);
  background: var(--sky-soft);
  border: 2px solid var(--sky-action);
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 48px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.suggestion:hover { background: var(--sky); color: var(--cocoa); }
.suggestion:focus-visible { outline: 3px solid var(--caramel); outline-offset: 2px; }
.suggestion:disabled { opacity: 0.45; cursor: default; }

/* ═══════════════ 5. TRUST ═══════════════ */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.section-trust h2 { text-align: left; }
.trust-list { list-style: none; margin-top: 32px; display: grid; gap: 24px; }
.trust-list li {
  background: var(--cream);
  border-left: 6px solid var(--success);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 24px;
  font-size: 1.12rem;
  line-height: 1.75;
}
.trust-list strong { font-family: var(--font-display); font-weight: 500; font-size: 1.22rem; }
.trust-art img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* สรุปสั้นเรื่องข้อมูล Google — รายละเอียดเต็มอยู่หน้า google-data.html */
.google-note {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid rgba(90, 50, 31, 0.16);
  border-radius: var(--radius);
  background: var(--sky-soft);
  font-size: 1rem;
  line-height: 1.75;
}
.google-note a { color: var(--sky-action); text-underline-offset: 3px; }
.google-note [lang="en"] { display: block; margin-top: 6px; opacity: 0.85; }

/* ═══════════════ 6. PRICING ═══════════════ */
.section-pricing { background: var(--cream); }

/* Founding 1,000 banner — เหนือการ์ดทั้งหมด */
.founding-banner {
  background: linear-gradient(135deg, var(--sky-action), var(--caramel));
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-top: 32px;
}
.founding-banner__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.founding-banner__body { margin: 0 0 16px; font-size: 1.05rem; opacity: 0.95; }
.founding-banner .btn-plan {
  background: #fff;
  color: var(--cocoa);
  margin-top: 0;
}

/* Toggle รายเดือน/รายปี */
.pricing-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 32px auto 0;
  background: var(--ivory);
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
  box-shadow: var(--shadow);
}
.toggle-btn {
  font-family: var(--font-display);
  border: none;
  background: transparent;
  color: var(--cocoa);
  font-size: 1rem;
  border-radius: 999px;
  padding: 10px 24px;
  cursor: pointer;
  min-height: 48px;
}
.toggle-btn.is-active { background: var(--sky-action); color: #fff; }

.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.plan h3 { font-size: 1.6rem; line-height: 1.2; }
.plan-pitch { font-size: 1rem; opacity: 0.8; margin: 2px 0 0; }
.price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--caramel);
  margin: 10px 0 2px;
  line-height: 1.15;
}
.price span { font-size: 1rem; font-family: var(--font-body); color: var(--cocoa); font-weight: 400; }
.price-monthly, .price-yearly { display: none; }
.price-monthly { display: block; }
/* ราคาต่อวัน — สลับพร้อมกับราคาหลักเมื่อกด toggle รายเดือน/รายปี */
.price-perday {
  font-size: 0.98rem;
  color: var(--success);
  font-weight: 600;
  margin: 0 0 18px;
  min-height: 1.7em;
}
.perday-monthly, .perday-yearly { display: none; }
.perday-monthly { display: block; }
.plans.is-yearly .price-monthly,
.plans.is-yearly .perday-monthly { display: none; }
.plans.is-yearly .price-yearly,
.plans.is-yearly .perday-yearly { display: block; }
.plan ul {
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 1.05rem;
  line-height: 1.55;
  flex: 1;
  text-align: left;
  align-content: start;
}
.plan li { word-break: keep-all; overflow-wrap: break-word; }
.plan li::before { content: "✓ "; color: var(--success); font-weight: 700; }
/* บรรทัดแรก "ทุกอย่างใน <แพ็กก่อนหน้า>" — ย่อรายละเอียดซ้ำให้การ์ดสั้นลง */
.plan-inherit {
  font-family: var(--font-display);
  color: var(--caramel);
  padding-bottom: 8px;
  margin-bottom: 2px;
  border-bottom: 1px dashed rgba(90, 50, 31, 0.2);
}
.plan-inherit::before { content: "★ "; color: var(--caramel); }
.plan-foot { font-size: 0.92rem; opacity: 0.7; margin-top: 12px; text-align: left; }

/* แพ็กเกจแนะนำ — ใบเดียวเด่น อีกสามใบรอง */
.plan-featured {
  border: 3px solid var(--sky-action);
  transform: scale(1.05);
  position: relative;
  z-index: 1;
}
.plan-badge {
  font-family: var(--font-display);
  display: inline-block;
  background: var(--sky-action);
  color: #fff;
  font-size: 1rem;
  border-radius: 999px;
  padding: 4px 20px;
  margin-bottom: 12px;
}
.btn-plan { align-self: center; margin-top: 24px; font-size: 1.15rem; padding: 14px 28px; }
.pricing-note { text-align: center; margin-top: 40px; font-size: 1.05rem; opacity: 0.75; }

/* ═══════════════ 7. FAQ + FINAL CTA ═══════════════ */
.faq {
  background: var(--cream);
  border-radius: var(--radius);
  margin-top: 20px;
  overflow: hidden;
}
.faq summary {
  font-family: var(--font-display);
  font-size: 1.25rem;
  padding: 20px 28px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 28px;
  color: var(--caramel);
  font-size: 1.6rem;
  transition: transform 0.2s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 28px 22px; font-size: 1.12rem; }
.faq summary:focus-visible { outline: 3px solid var(--caramel); outline-offset: -3px; }

.final-cta {
  text-align: center;
  margin-top: 80px;
  background: var(--sky-soft);
  border-radius: 32px;
  padding: 56px 32px;
}
.final-mascot {
  width: 130px; height: 130px;
  border-radius: 50%;
  margin: 0 auto 20px;
  box-shadow: var(--shadow);
}
.final-cta h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.final-cta > p { margin: 12px 0 28px; }
.btn-big { font-size: 1.5rem; padding: 20px 52px; }

/* ═══════════════ FOOTER ═══════════════ */
.site-footer {
  background: var(--cream);
  border-top: 1px solid rgba(90, 50, 31, 0.12);
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.footer-brand p { font-size: 1rem; line-height: 1.65; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.2rem; }
.footer-col { display: flex; flex-direction: column; }
.footer-head {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  text-align: left;
}
.footer-col a,
.footer-col .footer-cookie-button {
  font-size: 1rem;
  justify-content: flex-start;
  text-align: left;
}
.footer-company { font-size: 0.95rem; opacity: 0.75; margin-top: 4px; }
.footer-legal {
  border-top: 1px solid rgba(90, 50, 31, 0.12);
  padding: 20px 24px 28px;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.75;
}

.site-footer a,
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--sky-action);
  text-underline-offset: 4px;
}
.footer-cookie-button {
  min-height: 48px;
  border: 0;
  padding: 0;
  color: var(--sky-action);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.site-footer a:focus-visible,
.legal-back:focus-visible,
.footer-cookie-button:focus-visible { outline: 3px solid var(--caramel); outline-offset: 4px; }

/* ═══════════════ LEGAL PAGES ═══════════════ */
.legal-shell { min-height: 100vh; background: var(--ivory); }
.legal-header {
  padding: 32px 24px;
  border-bottom: 1px solid rgba(90, 50, 31, 0.12);
  background: rgba(255, 246, 233, 0.96);
}
.legal-header-inner,
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cocoa);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
}
.legal-brand img { width: 52px; height: 52px; border-radius: 50%; }
.legal-content { padding: 64px 24px 96px; }
.legal-content h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); margin-bottom: 10px; }
.legal-updated { color: #7C695B; font-size: 1rem; margin-bottom: 40px; }
.legal-content section { margin-top: 36px; }
.legal-content h2 { font-size: 1.5rem; margin-bottom: 10px; }
.legal-content p,
.legal-content li { font-size: 1.1rem; line-height: 1.85; }
.legal-content ul,
.legal-content ol { padding-left: 28px; display: grid; gap: 10px; }
.legal-callout {
  margin: 32px 0;
  padding: 24px 28px;
  border-left: 6px solid var(--sky-action);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--sky-soft);
}
.legal-actions { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.legal-actions .btn-primary { font-size: 1.15rem; padding: 14px 28px; }
.legal-cookie-settings { border: 0; cursor: pointer; }

/* ═══════════════ COOKIE CONSENT ═══════════════ */
.cookie-consent {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 90;
  display: flex;
  justify-content: center;
  animation: cookie-enter 180ms ease-out;
}
.cookie-consent.is-hiding {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.cookie-consent__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: min(960px, 100%);
  padding: 22px 24px;
  border: 1px solid rgba(90, 50, 31, 0.16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(90, 50, 31, 0.22);
}
.cookie-consent__copy h2 {
  font-size: 1.3rem;
  text-align: left;
}
.cookie-consent__copy p {
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.6;
}
.cookie-consent__copy a { color: var(--sky-action); text-underline-offset: 3px; }
.cookie-consent__actions { display: flex; gap: 10px; }
.cookie-button {
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--sky-action);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  cursor: pointer;
}
.cookie-button--primary { color: #fff; background: var(--sky-action); }
.cookie-button--secondary { color: var(--sky-action); background: #fff; }
.cookie-button:focus-visible { outline: 4px solid var(--caramel); outline-offset: 3px; }
@keyframes cookie-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ปุ่มลอยล่างจอมือถือ */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 246, 233, 0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 -4px 16px rgba(90, 50, 31, 0.12);
  transform: translateY(110%);
  transition: transform 0.3s ease;
  z-index: 50;
  text-align: center;
}
.sticky-cta.show { transform: translateY(0); }
.btn-sticky { display: block; font-size: 1.25rem; padding: 15px 20px; }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ── scroll reveal ───────────────────────────────────── */
.js-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1000px) {
  .site-nav { gap: 0; }
  .site-nav a { padding: 0 10px; font-size: 1rem; }
}

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-grid { grid-template-columns: 1fr; }
  .section-trust h2 { text-align: center; }
  .trust-art { order: -1; max-width: 520px; margin: 0 auto; }
  .container-pricing { max-width: 720px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan { padding-right: 32px; padding-left: 32px; }
  .plan-featured { transform: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 1.15rem; }
  .section { padding: 64px 0; }
  /* จอแคบ: เหลือโลโก้ + ปุ่ม ลิงก์เมนูไปอยู่ footer แทน (กันแถบล้น) */
  .site-nav { display: none; }
  .site-header__inner { padding: 8px 16px; gap: 12px; }
  .btn-nav { margin-left: auto; font-size: 1rem; padding: 11px 20px; }
  #features, #pricing, #faq { scroll-margin-top: 72px; }
  .hero { padding: 32px 0 16px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-sub { max-width: none; }
  .hero-sub br { display: none; }
  .user-proof { margin-right: auto; margin-left: auto; }
  .hero-stage { min-height: 270px; margin-top: 0; }
  .hero-mascot-wrap { width: min(250px, 70%); }
  .chip { font-size: 0.9rem; }
  .steps, .plans { grid-template-columns: 1fr; }
  .plan-featured { transform: none; }
  .features { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .section-steps { border-radius: 36px 36px 0 0; }
  .footer-inner { grid-template-columns: 1fr; padding: 40px 24px 24px; }
  .footer-legal { padding-bottom: 120px; }  /* กันปุ่มลอยบังลิขสิทธิ์ */
  .legal-content { padding-top: 48px; }
  .cookie-consent { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; }
  .cookie-consent__content { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .cookie-consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-button { padding-right: 10px; padding-left: 10px; }
}

/* ═══════════════ REDUCED MOTION — ภาพนิ่งสำรองทุกจุด ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mascot-wrap { animation: none; }
  .chip { animation: none; opacity: 1; }
  .cheek-check { animation: none; opacity: 0; }
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .feature, .btn-primary, .sticky-cta, .cookie-consent { animation: none; transition: none; }
  .confirm-card { animation: none; }
}
