/* ============================================================
   FS96 — landing page
   Palette: cherry #f07a7a + gold #e5b567 on ink #14100e
   สีสด แต่คุม saturation ไว้ไม่ให้แสบตา
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #14100e;
  --ink-2: #1b1512;
  --ink-3: #221a15;
  --ink-4: #2c211b;

  --cherry: #f07a7a;
  --cherry-deep: #c96565;
  --gold: #e5b567;
  --gold-soft: #f2d7a8;

  --text: #f4ece4;
  --muted: #a2938a;
  --line: rgba(229, 181, 103, 0.16);
  --line-strong: rgba(229, 181, 103, 0.36);

  --grad-hot: linear-gradient(120deg, var(--gold) 0%, var(--cherry) 55%, var(--gold) 100%);
  --grad-panel: linear-gradient(160deg, rgba(240, 122, 122, 0.07), rgba(229, 181, 103, 0.04));

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 18px 48px rgba(240, 122, 122, 0.2);

  --radius: 18px;
  --radius-lg: 26px;
  --shell: 1240px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.68, 0.35, 1);
  --font-th: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Cinzel", Georgia, serif;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-th);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  /* พื้นหลังไล่โทนอุ่น ๆ ให้ไม่แบน */
  background-image:
    radial-gradient(90rem 44rem at 12% -8%, rgba(240, 122, 122, 0.12), transparent 62%),
    radial-gradient(70rem 40rem at 92% 4%, rgba(229, 181, 103, 0.1), transparent 60%);
  background-attachment: fixed;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(240, 122, 122, 0.32);
  color: #fff;
}

/* ---------- 3. Layout helpers ---------- */
.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.shell-narrow {
  max-width: 860px;
}

/* กัน Swiper คำนวณความกว้างวนซ้ำจนล้น เมื่ออยู่ในคอลัมน์ grid/flex
   (grid/flex item มี min-width เป็น auto โดยปริยาย จึงยืดตามลูกได้ไม่จำกัด) */
.swiper {
  min-width: 0;
  max-width: 100%;
}

.section {
  padding: clamp(4rem, 9vw, 7rem) 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(34, 26, 21, 0.62) 14%, rgba(34, 26, 21, 0.62) 86%, transparent);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  background: var(--grad-hot);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.9rem;
  padding: 0.34rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(240, 122, 122, 0.07);
  color: var(--gold-soft);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cherry);
  box-shadow: 0 0 0 0 rgba(240, 122, 122, 0.6);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(240, 122, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 122, 122, 0);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border-radius: 0 0 12px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- 4. Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.04);
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad-hot);
  box-shadow: 0 0 12px rgba(240, 122, 122, 0.5);
}

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease),
    border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-lg {
  padding: 0.92rem 2rem;
  font-size: 1.02rem;
}

.btn-primary {
  background: var(--grad-hot);
  background-size: 200% auto;
  color: #2a1410;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-position: right center;
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(240, 122, 122, 0.34);
}

.btn-outline {
  border: 1px solid var(--line-strong);
  color: var(--gold-soft);
  background: rgba(229, 181, 103, 0.05);
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(229, 181, 103, 0.13);
  transform: translateY(-3px);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--gold-soft);
}

.btn-line {
  background: linear-gradient(120deg, #4f9c6a, #6fbf86);
  color: #0d1a12;
  box-shadow: 0 14px 32px rgba(79, 156, 106, 0.28);
}

.btn-line:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(79, 156, 106, 0.38);
}

/* ประกายวิ่งผ่านปุ่มตอน hover */
.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -140%;
  width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.75s var(--ease);
}

.btn-shine:hover::after {
  left: 140%;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: fixed;
  inset: 3px 0 auto 0;
  z-index: 110;
  transition: background-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease),
    box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(20, 16, 14, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
}

.brand img {
  height: 42px;
  width: auto;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.brand:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 0 14px rgba(240, 122, 122, 0.4));
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 0.35rem;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 0.5rem 0.7rem;
  font-size: 0.92rem;
  white-space: nowrap;
  color: var(--muted);
  border-radius: 10px;
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.main-nav a:hover,
.main-nav a.is-current {
  color: var(--text);
  background: rgba(229, 181, 103, 0.07);
}

.main-nav a:hover::after,
.main-nav a.is-current::after {
  transform: scaleX(1);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  /* ต้องอยู่เหนือลิ้นชัก (z-index 108) เพราะเป็น sibling กันใน header */
  position: relative;
  z-index: 109;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-soft);
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(9, 6, 5, 0.6);
  backdrop-filter: blur(3px);
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background:
    radial-gradient(38rem 22rem at 22% 30%, rgba(240, 122, 122, 0.2), transparent 68%),
    radial-gradient(34rem 20rem at 78% 18%, rgba(229, 181, 103, 0.16), transparent 66%);
  filter: blur(12px);
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: translate3d(2%, 3%, 0) scale(1.06);
  }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  margin-bottom: 1.1rem;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy .line-1 {
  font-family: var(--font-display);
  font-size: 1.18em;
  letter-spacing: 0.06em;
  background: var(--grad-hot);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sweep 7s linear infinite;
}

@keyframes sweep {
  to {
    background-position: 220% center;
  }
}

.hero-copy .line-2 {
  font-size: 0.56em;
  color: var(--text);
  font-weight: 600;
}

.hero-copy .line-3 {
  font-size: 0.46em;
  color: var(--muted);
  font-weight: 500;
}

.hero-copy .line-3 em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}

.hero-copy .lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-copy .lead strong {
  color: var(--gold-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0 1.4rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-media {
  position: relative;
  min-width: 0;
}

.hero-swiper {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
}

.hero-slide {
  margin: 0;
  position: relative;
}

.hero-slide img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-slide figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.6rem 1.4rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(to top, rgba(15, 11, 9, 0.9), transparent);
}

.hero-pagination {
  --swiper-pagination-color: var(--gold);
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 0.35;
  --swiper-pagination-bullet-size: 8px;
}

/* ---------- 8. Stats ---------- */
.stats {
  padding: 0 0 clamp(1rem, 4vw, 2rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--grad-panel);
  backdrop-filter: blur(6px);
}

.stat {
  text-align: center;
  border-radius: var(--radius);
  padding: 0.6rem 0.4rem;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.stat:hover {
  background: rgba(229, 181, 103, 0.07);
  transform: translateY(-4px);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.2;
  background: var(--grad-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- 9. Feature cards (spotlight ตามเมาส์) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
}

.feature-card {
  position: relative;
  padding: 1.9rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* วงแสงตามตำแหน่งเมาส์ — ตัวแปร --mx/--my ตั้งจาก JS */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(18rem 18rem at var(--mx, 50%) var(--my, 50%), rgba(240, 122, 122, 0.16), transparent 65%);
  transition: opacity 0.4s var(--ease);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  border-radius: 16px;
  background: rgba(229, 181, 103, 0.1);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease), background-color 0.4s var(--ease);
}

.feature-card:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
  background: rgba(240, 122, 122, 0.16);
}

.feature-card h3 {
  font-size: 1.12rem;
  color: var(--gold-soft);
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- 10. Filter chips ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.chip {
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.chip.is-active {
  color: #2a1410;
  background: var(--grad-hot);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(240, 122, 122, 0.24);
}

/* ---------- 11. Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.game-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.game-card.is-hidden {
  display: none;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-glow);
}

.game-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}

.game-card:hover .game-thumb img {
  transform: scale(1.09);
  filter: saturate(1.15) brightness(1.05);
}

.game-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: #fff;
  opacity: 0;
  background: rgba(20, 16, 14, 0.5);
  transition: opacity 0.35s var(--ease);
}

.game-card:hover .game-play {
  opacity: 1;
}

.game-card h3 {
  margin: 0.85rem 0.9rem 0.15rem;
  font-size: 0.95rem;
  color: var(--text);
}

.game-meta {
  margin: 0 0.9rem 0.95rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.grid-empty {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- 12. Providers ---------- */
.provider-swiper {
  padding: 0.4rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.provider-track {
  transition-timing-function: linear !important;
  align-items: stretch;
}

.provider-chip {
  display: grid;
  place-items: center;
  width: auto !important;
  min-width: 168px;
  height: 84px;
  padding: 0 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

.provider-chip:hover {
  color: var(--gold);
  border-color: var(--line-strong);
  background: rgba(229, 181, 103, 0.07);
  transform: translateY(-4px);
}

/* ---------- 13. Promotions ---------- */
.promo-swiper {
  padding: 0 0 3rem;
}

.promo-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--ink-2);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.promo-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.promo-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.promo-card:hover img {
  transform: scale(1.06);
}

.promo-tag {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #2a1410;
  background: var(--grad-hot);
}

.promo-name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.4rem 1rem 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  background: linear-gradient(to top, rgba(15, 11, 9, 0.92), transparent);
}

.promo-pagination {
  --swiper-pagination-color: var(--cherry);
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 0.3;
  bottom: 0 !important;
}

.promo-prev,
.promo-next {
  --swiper-navigation-color: var(--gold);
  --swiper-navigation-size: 22px;
}

/* ---------- 14. Steps ---------- */
.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  counter-reset: step;
}

.step-card {
  position: relative;
  padding: 2.2rem 1.6rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.step-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--grad-hot);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}

.step-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.step-card:hover::after {
  transform: scaleY(1);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(229, 181, 103, 0.28);
}

.step-card h3 {
  margin: 0.7rem 0 0.5rem;
  font-size: 1.1rem;
  color: var(--gold-soft);
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- 15. CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(30rem 16rem at 15% 20%, rgba(240, 122, 122, 0.18), transparent 65%),
    radial-gradient(26rem 14rem at 85% 80%, rgba(229, 181, 103, 0.16), transparent 65%),
    var(--ink-3);
}

.cta-band h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  color: var(--gold-soft);
}

.cta-band p {
  margin: 0;
  color: var(--muted);
}

/* ---------- 16. Reviews ---------- */
.review-swiper {
  padding-bottom: 3rem;
}

.review-card {
  height: 100%;
  margin: 0;
  padding: 1.75rem 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.review-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.review-card p {
  color: var(--text);
  font-size: 0.98rem;
}

.review-card footer {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.review-card cite {
  font-style: normal;
  font-weight: 700;
  color: var(--gold-soft);
}

.review-card footer span {
  font-size: 0.82rem;
  color: var(--muted);
}

.review-pagination {
  --swiper-pagination-color: var(--gold);
  --swiper-pagination-bullet-inactive-color: #fff;
  --swiper-pagination-bullet-inactive-opacity: 0.3;
  bottom: 0 !important;
}

/* ---------- 17. Articles ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.article-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease);
}

.article-card:hover .article-thumb img {
  transform: scale(1.07);
}

.article-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.article-meta {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.article-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  transition: color 0.35s var(--ease);
}

.article-card:hover h3 {
  color: var(--gold);
}

.article-body > p:last-of-type {
  color: var(--muted);
  font-size: 0.92rem;
}

.article-more {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cherry);
  transition: transform 0.35s var(--ease);
}

.article-card:hover .article-more {
  transform: translateX(5px);
}

/* ---------- 18. FAQ ---------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}

.faq-item:hover,
.faq-item.is-open {
  border-color: var(--line-strong);
}

.faq-item h3 {
  margin: 0;
  font-size: 1rem;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.05rem 1.25rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  transition: color 0.3s var(--ease);
}

.faq-q:hover {
  color: var(--gold);
}

.faq-icon {
  position: relative;
  flex: 0 0 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform 0.35s var(--ease);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-icon::after {
  transform: rotate(0);
}

.faq-a {
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-a p {
  margin: 0;
}

/* ---------- 19. Footer ---------- */
.site-footer {
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: clamp(3rem, 6vw, 4.5rem) 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(34, 26, 21, 0.55), rgba(20, 16, 14, 0.95));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2rem;
}

.footer-brand img {
  height: 46px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 40ch;
}

.age-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gold-soft);
}

.age-badge span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-weight: 700;
  font-size: 0.78rem;
}

.footer-nav h2,
.footer-contact h2 {
  font-size: 0.95rem;
  color: var(--gold-soft);
  margin-bottom: 0.9rem;
}

.footer-nav a {
  display: inline-block;
  padding: 0.24rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}

.footer-nav a:hover {
  color: var(--gold);
  transform: translateX(4px);
}

.footer-contact p {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.responsible {
  max-width: 68ch;
  margin: 0 auto 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(162, 147, 138, 0.7);
}

/* ---------- 20. Mobile bar & to-top ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 100;
  padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(20, 16, 14, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.5rem 0.25rem;
  border-radius: 14px;
  font-size: 0.76rem;
  color: var(--muted);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.mobile-bar a span {
  font-size: 1.05rem;
}

.mobile-bar a:hover {
  color: var(--text);
}

.mobile-bar a.is-primary {
  color: #2a1410;
  background: var(--grad-hot);
  font-weight: 700;
}

.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.4rem;
  z-index: 99;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.2rem;
  color: #2a1410;
  background: var(--grad-hot);
  box-shadow: var(--shadow-glow);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.to-top:hover {
  transform: translateY(-4px) scale(1.06);
}

/* ---------- 21. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

/* display: grid ชนะ [hidden] ต้องประกาศทับให้ชัด */
.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 6, 5, 0.78);
  backdrop-filter: blur(5px);
  animation: fade 0.28s var(--ease);
}

.modal-panel {
  position: relative;
  width: min(100%, 520px);
  padding: 2.1rem 1.9rem 1.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--ink-3);
  box-shadow: var(--shadow-md);
  animation: rise 0.34s var(--ease);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}

.modal-panel h2 {
  font-size: 1.3rem;
  color: var(--gold-soft);
}

.modal-panel p {
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.8rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

body.is-locked {
  overflow: hidden;
}

/* ---------- 22. Lazy image fade-in ---------- */
/* ตาข่ายกันพลาด: ถ้า AOS โหลดไม่ได้หรือเริ่มทำงานไม่ทัน
   เนื้อหาต้องมองเห็นเสมอ ห้ามค้างที่ opacity 0 */
html.aos-off [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ซ่อนไว้เฉพาะตอน JS ทำงาน — ถ้า JS ปิด รูปจะแสดงตามปกติ */
.js img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}

.js img[loading="lazy"].is-loaded {
  opacity: 1;
}

/* ---------- 23. Responsive ---------- */
@media (max-width: 1200px) {
  .main-nav a {
    padding: 0.5rem 0.45rem;
    font-size: 0.86rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ต่ำกว่านี้เมนูแนวนอนเริ่มเบียด เปลี่ยนเป็นลิ้นชักแทน */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: -1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 108;
    width: min(84vw, 340px);
    padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .main-nav a::after {
    display: none;
  }

  .mobile-bar {
    display: flex;
  }

  body {
    padding-bottom: 74px;
  }

  .to-top {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1.75rem, var(--shell));
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .hero-actions .btn {
    flex: 1;
  }
}

/* ---------- 24. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  img[loading="lazy"] {
    opacity: 1;
  }
}

/* ---------- 25. Print ---------- */
@media print {
  .site-header,
  .mobile-bar,
  .to-top,
  .scroll-progress,
  .hero-glow {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
