/* ============================================================
   z16 — "Cosmic Fortune" theme
   ม่วงคอสมิค-ทอง-ฟ้าไซแอน (ตามโทนจริงของแบนเนอร์/ปุ่ม login-register)
   ฟอนต์ Charmonman (หัวข้อ, ลายเส้นหรู) + Prompt (เนื้อหา) — คู่ใหม่ยังไม่เคยใช้ในแบรนด์อื่น
   ============================================================ */

:root {
  --purple: #2a1258;
  --purple-deep: #150a30;
  --purple-bright: #7a3ff0;
  --gold: #ffce54;
  --gold-deep: #d99a10;
  --cyan: #4fd8f0;
  --cyan-deep: #1fa9c9;
  --bg: #150a30;
  --bg-alt: #1d0f42;
  --panel: #241354;
  --line: #3d2470;
  --ink: #f3ecff;
  --muted: #c6b8ec;
  --ink-dark: #221142;
  --muted-dark: #6a5b96;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(0,0,0,0.5);
  --font-head: 'Charmonman', cursive;
  --font-body: 'Prompt', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(rgba(21,10,48,.2), rgba(21,10,48,.2)), url("assets/img/bg-desktop.webp") center/cover fixed;
}
@media (max-width: 760px) {
  body { background: linear-gradient(rgba(21,10,48,.25), rgba(21,10,48,.25)), url("assets/img/bg-moblie.webp") center/cover fixed; background-attachment: scroll; }
}
img { max-width: 100%; display: block; }
a { text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0 0 0.6rem; color: var(--ink); line-height: 1.25; }
h1 { font-size: 2.1rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 700; }
p { line-height: 1.85; margin: 0 0 1rem; }
.grad-text { background: linear-gradient(135deg, var(--gold), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== HEADER ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(21, 10, 48, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.65rem 1.2rem; }
.logo-link img { height: 42px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-menu a { color: var(--muted); font-weight: 500; font-size: 0.96rem; }
.nav-menu a:hover, .nav-menu a.active { color: var(--gold); }
.header-btns { display: flex; align-items: center; gap: 0.5rem; }
.img-btn img { height: 34px; width: auto; transition: transform 0.18s ease; }
.img-btn:hover img { transform: translateY(-2px) scale(1.03); }
.img-btn.lg img { height: 46px; }

/* ===== HERO — banner carousel strip, big and clear ===== */
.hero { position: relative; padding: 1.6rem 0 1rem; overflow: hidden; }
.banner-strip { display: flex; gap: 1rem; overflow-x: auto; padding: 0 1.2rem 0.6rem; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner-strip::-webkit-scrollbar { display: none; }
.banner-strip img { flex-shrink: 0; width: 92%; max-width: 1000px; border-radius: var(--radius); border: 1px solid var(--purple-bright); box-shadow: var(--shadow); scroll-snap-align: center; }
.hero-copy { max-width: 900px; margin: 1.6rem auto 0; text-align: center; padding: 0 1.2rem; }
.hero-copy .eyebrow { justify-content: center; display: flex; }
.hero-copy p { color: var(--muted); font-size: 1.02rem; }
.hero-actions { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.2rem; flex-wrap: wrap; }

.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; letter-spacing: 0.05em; color: var(--gold); font-weight: 600; margin-bottom: 0.7rem; font-family: var(--font-body); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(79,216,240,0.3); display: inline-block; }

/* ===== BUTTONS (fallback) ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.8rem 1.9rem; border-radius: 999px; font-weight: 700; font-size: 0.98rem; border: 2px solid transparent; cursor: pointer; font-family: var(--font-body); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--ink-dark); }
.btn-outline { border-color: var(--cyan-deep); color: var(--cyan); background: transparent; }

/* ===== SECTIONS ===== */
.section { padding: 3.2rem 1.2rem; }
.section.alt { background: rgba(255,255,255,0.03); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 2.2rem; }
.section-head p { color: var(--muted); }

/* ===== TIP GRID (H3 groups) ===== */
.tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.tip-card { background: #fff9ec; border: 1px solid #ecdfc4; border-radius: var(--radius); padding: 1.5rem; }
.tip-card .tip-num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--purple-bright); color: #fff; font-weight: 800; align-items: center; justify-content: center; margin-bottom: 0.8rem; font-family: var(--font-head); }
.tip-card h3 { color: var(--ink-dark); }
.tip-card p { color: var(--muted-dark); font-size: 0.9rem; margin: 0; }

/* ===== PROVIDER GRID — image-heavy tiled cards ===== */
.provider-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-top: 1.6rem; }
.provider-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--purple-bright); background: var(--panel); transition: transform 0.18s ease; }
.provider-card:hover { transform: translateY(-4px); }
.provider-card img { width: 100%; }

/* ===== MASCOT TRIO — centered showcase, not corner decoration ===== */
.mascot-trio { display: flex; justify-content: center; align-items: flex-end; gap: 1.8rem; max-width: 780px; margin: 0 auto; flex-wrap: wrap; }
.mascot-trio img { width: 30%; max-width: 220px; filter: drop-shadow(0 16px 28px rgba(0,0,0,0.55)); }
@media (max-width: 640px) { .mascot-trio img { width: 42%; } }

/* ===== MINI STRIP — 4 portrait feature cards ===== */
.mini-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.mini-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gold-deep); background: var(--panel); transition: transform 0.18s ease; }
.mini-card:hover { transform: translateY(-6px); }
.mini-card img { width: 100%; }

/* ===== FEATURE BLOCK — text + wallet/auto highlight ===== */
.feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.feature-block .fb-copy p { color: var(--muted); }

/* ===== TEASER SPLIT ===== */
.teaser-split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.teaser-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.teaser-card img { width: 100%; height: 200px; object-fit: cover; }
.teaser-card-body { padding: 1.4rem; }
.teaser-card-body h3 { color: var(--gold); font-family: var(--font-head); font-size: 1.3rem; }
.teaser-card-body p { color: var(--muted); font-size: 0.92rem; }

/* ===== CTA ===== */
.cta-section { position: relative; padding: 1rem 1.2rem 4rem; }
.cta-panel { max-width: 980px; margin: 0 auto; text-align: center; padding: 2.8rem 1.6rem; border-radius: 26px; background: linear-gradient(150deg, var(--purple-deep), var(--panel) 70%); border: 1px solid var(--gold); }
.cta-figure { position: absolute; right: 3%; bottom: 4.5rem; width: 150px; opacity: 0.95; pointer-events: none; z-index: 1; filter: drop-shadow(0 14px 26px rgba(0,0,0,0.55)); }
@media (max-width: 950px) { .cta-figure { display: none; } }
.cta-btns { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.3rem; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 2.6rem 1.2rem 6rem; border-top: 1px solid var(--line); }
.footer-logo { height: 40px; margin: 0 auto 1rem; }
.footer-tagline { color: var(--muted); max-width: 560px; margin: 0 auto 0.6rem; font-size: 0.92rem; }
.footer-copy { color: var(--muted-dark); font-size: 0.82rem; }
.footer-tagline a, .footer-tagline b { color: var(--gold); }

/* ===== LINE FAB ===== */
.line-fab { position: fixed; right: 18px; bottom: 96px; z-index: 60; display: flex; align-items: center; gap: 0.4rem; background: #06c755; color: #fff; padding: 0.6rem 1rem; border-radius: 999px; box-shadow: 0 10px 24px rgba(0,0,0,0.4); font-weight: 700; font-size: 0.85rem; }
.line-fab svg { width: 20px; height: 20px; fill: #fff; }
@media (max-width: 760px) { .line-fab { bottom: 80px; right: 12px; padding: 0.55rem 0.75rem; } .line-fab span { display: none; } }

/* ===== STICKY BAR — full-width mobile, capped on desktop ===== */
.sticky-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: rgba(21, 10, 48, 0.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 0.5rem 0.6rem; align-items: center; justify-content: space-around; }
@media (min-width: 481px) {
  .sticky-bar { left: 50%; right: auto; transform: translateX(-50%); width: 100%; max-width: 460px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 16px 16px 0 0; }
}
.mnav-item { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; font-size: 0.62rem; color: var(--muted); font-weight: 600; padding: 0.4rem 0.5rem; flex: 1; text-align: center; }
.mnav-item svg { width: 18px; height: 18px; fill: var(--cyan); }
.mnav-item.active { color: var(--gold); }
.mnav-item.active svg { fill: var(--gold); }

/* ===== reveal-on-scroll ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== PAGE (promotion/article) SHARED ===== */
.page-hero { text-align: center; padding: 3rem 1.2rem 1.2rem; max-width: 820px; margin: 0 auto; }
.page-hero h1 { font-size: 1.9rem; }
.page-hero p { color: var(--muted); }
.page-main { max-width: 820px; margin: 0 auto; padding: 1rem 1.2rem 3rem; }
.page-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.6rem; border: 1px solid var(--purple-bright); }
.page-content, .article-main { background: #fff9ec; border-radius: var(--radius); padding: 2rem 1.8rem; box-shadow: var(--shadow); }
.page-content h2, .page-content h3, .article-main h1, .article-main h2, .article-main h3 { color: var(--ink-dark); }
.page-content p, .article-main p { color: var(--muted-dark); }
.article-main { max-width: 820px; margin: 2rem auto 3rem; padding: 2rem 1.8rem; }
.article-meta { color: var(--muted-dark); font-size: 0.85rem; margin-top: -0.4rem; }
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 1.6rem 0 2rem; }
.promo-card { background: #fff; border: 1px solid #ecdfc4; border-radius: 16px; padding: 1.5rem; }
.promo-card .promo-tag { display: inline-block; background: rgba(122,63,240,0.1); color: var(--purple-bright); font-size: 0.72rem; font-weight: 700; padding: 0.22rem 0.7rem; border-radius: 999px; margin-bottom: 0.7rem; }
.promo-card h3 { color: var(--ink-dark); }
.promo-card p { color: var(--muted-dark); font-size: 0.9rem; margin: 0; }
.action-btns { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .tip-grid { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: repeat(4, 1fr); }
  .mini-strip { grid-template-columns: repeat(2, 1fr); }
  .feature-block { grid-template-columns: 1fr; }
  .teaser-split { grid-template-columns: 1fr; }
  .promo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-menu { display: none; }
  .provider-grid { grid-template-columns: repeat(3, 1fr); }
  body { padding-bottom: 4.6rem; }
  .sticky-bar { display: flex; }
}
