/* ===== Hub home page — "Meme Caption" design (2026-10-25) =====
   ใช้เฉพาะ index.html เท่านั้น — go.html / checkout*.html ยังใช้ style.css เดิมอยู่ อย่าลบ style.css
   แนวคิด: ภาษาภาพของคลิปเฟซบุ๊กไทย — ตัวหนังสือขาวขอบดำหนาแบบมีมแคปชั่น (แบบที่ทูลเราเบิร์นลงคลิปจริง),
   การ์ดสติกเกอร์ขอบดำเงาแข็ง, ป้ายราคา "190.-" แบบร้านไทย. พื้นขาว + เหลืองสด + น้ำเงินสำหรับปุ่มซื้อ/ลองใช้ */

:root {
  --page: #ffffff;
  --card: #ffffff;
  --ink: #17171c;
  --muted: #5d5e68;
  --line: #17171c;
  --sun: #ffd60a;
  --sun-soft: #fff6c7;
  --blue: #2355ff;
  --ok: #0f9d58;
  --hard: 4px 4px 0 var(--line);
  --cap: 'Kanit', 'Anuphan', sans-serif;
  --body: 'Anuphan', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #17171c;
  --card: #22222a;
  --ink: #f4f4f6;
  --muted: #a5a6b2;
  --line: #000000;
  --sun-soft: #2e2a14;
  --blue: #3d63ff;
  --ok: #1fa866;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a, button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* meme caption type: white fill + thick dark outline */
.meme {
  font-family: var(--cap); font-weight: 800; color: #fff;
  text-shadow:
    -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 6px 0 #000;
}

/* ===== top bar ===== */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--cap); font-weight: 600; font-size: 21px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); object-fit: cover; }
.top-actions { display: flex; gap: 10px; }
.sq {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); background: var(--card); box-shadow: 2px 2px 0 var(--line);
}
.sq:active { transform: translate(2px, 2px); box-shadow: none; }

/* ===== hero ===== */
.hero {
  position: relative; margin-top: 8px;
  background: var(--sun); color: #17171c;
  border: 2.5px solid var(--line); border-radius: 28px; box-shadow: 8px 8px 0 var(--line);
  padding: 44px 48px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center;
}
.hero h1 { margin: 0 0 18px; font-size: clamp(42px, 6vw, 76px); line-height: 1.12; letter-spacing: -0.01em; }
.hero h1 span { display: block; }
.hero p { margin: 0 0 26px; font-size: 19px; font-weight: 500; max-width: 26em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 14px;
  font-family: var(--cap); font-weight: 600; font-size: 18px;
  border: 2.5px solid var(--line); box-shadow: 3px 3px 0 var(--line);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-white { background: #fff; color: #17171c; }
.btn-ink { background: var(--ink); color: var(--page); }
.btn-off { background: var(--sun-soft); color: var(--muted); box-shadow: none !important; cursor: default; transform: none !important; }
/* big free-trial button (2026-11-03) */
.cta-row { align-items: center; }
.btn-free {
  position: relative; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 84px; padding: 14px 34px 14px 28px; border-radius: 18px;
  box-shadow: 5px 5px 0 var(--line); text-align: left;
  animation: free-nudge 2.6s ease-in-out infinite;
}
.btn-free:hover { box-shadow: 7px 7px 0 var(--line); transform: translate(-2px, -2px); animation: none; }
.free-main { font-weight: 800; font-size: 30px; line-height: 1.15; display: inline-flex; align-items: center; gap: 10px; }
.free-arrow { display: inline-block; transition: transform .15s ease; }
.btn-free:hover .free-arrow { transform: translateX(5px); }
.free-sub { font-family: var(--body); font-weight: 500; font-size: 15px; opacity: .92; }
.free-sticker {
  position: absolute; top: -16px; right: -16px; z-index: 1;
  padding: 3px 12px; border-radius: 12px; border: 2px solid var(--line);
  background: #ff3b5c; color: #fff; font-family: var(--cap); font-weight: 800; font-size: 18px; line-height: 1.3;
  transform: rotate(10deg); box-shadow: 2px 2px 0 var(--line);
}
.free-note { margin: 14px 0 0 !important; font-size: 15px !important; font-weight: 600 !important; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.free-note span { white-space: nowrap; }
@keyframes free-nudge { 0%, 86%, 100% { transform: none; } 90% { transform: translateY(-4px) rotate(-1deg); } 94% { transform: translateY(0) rotate(1deg); } }
.langs { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.langs b { font-family: var(--cap); font-weight: 600; margin-right: 4px; }
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; background: rgba(255,255,255,.8); border: 1.5px solid #17171c; font-size: 14px; font-weight: 500; }
.lang img { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }

/* phone: tool clips cross-fade, each with its own burned-in caption */
.phone {
  justify-self: center; width: min(100%, 300px); aspect-ratio: 9 / 18.5;
  border-radius: 38px; background: #0d0d10; border: 2.5px solid #17171c; box-shadow: 6px 6px 0 #17171c;
  padding: 10px; transform: rotate(2.5deg);
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #222; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.shot.on { opacity: 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .meme { position: absolute; left: 10px; right: 10px; top: 16%; text-align: center; font-size: 25px; line-height: 1.25; }
.shot .tool { position: absolute; left: 12px; bottom: 14px; font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 34%; height: 20px; border-radius: 999px; background: #0d0d10; z-index: 2; }

/* ===== tabs ===== */
.tabs-wrap { position: sticky; top: 0; z-index: 10; background: var(--page); padding-top: 28px; }
.tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 14px; padding-top: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; padding: 9px 18px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--card); box-shadow: 2px 2px 0 var(--line);
  font-family: var(--cap); font-weight: 600; font-size: 16.5px;
}
.tab.is-active { background: var(--sun); color: #17171c; }

.panel { display: none; padding-top: 18px; padding-bottom: 96px; }
.panel.is-active { display: block; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-bottom: 26px; }
.panel-head h2 { font-family: var(--cap); font-weight: 800; font-size: 32px; line-height: 1.25; margin: 0; }
.panel-head p { margin: 2px 0 0; color: var(--muted); }
.deal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px 12px 20px; border: 2.5px solid var(--line); border-radius: 18px; background: var(--sun-soft); box-shadow: var(--hard); }
.deal-text { font-size: 16px; line-height: 1.4; }
.deal-text b { font-family: var(--cap); font-weight: 800; font-size: 24px; }
.deal .btn { min-height: 46px; font-size: 17px; padding: 0 20px; }

/* ===== sticker cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 2.5px solid var(--line); border-radius: 22px; box-shadow: var(--hard); }
.pic { position: relative; aspect-ratio: 1; border-radius: 19.5px 19.5px 0 0; overflow: hidden; border-bottom: 2.5px solid var(--line); background: var(--sun); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic .meme { position: absolute; left: 12px; right: 12px; bottom: 14px; margin: 0; text-align: center; font-size: 27px; line-height: 1.2; }
.pic.no-img .meme { bottom: auto; top: 50%; transform: translateY(-50%); font-size: 32px; }
.card.is-soon .pic img { filter: grayscale(1); opacity: .5; }
.card.is-soon .pic.no-img { background: var(--sun-soft); }
.tag {
  position: absolute; z-index: 2; top: -12px; right: -10px;
  padding: 5px 13px; border-radius: 12px; border: 2px solid var(--line);
  font-family: var(--cap); font-weight: 800; font-size: 16px; line-height: 1.3;
  background: var(--sun); color: #17171c; transform: rotate(6deg); box-shadow: 2px 2px 0 var(--line);
}
.tag.price { background: #fff; }
.tag.ok { background: var(--ok); color: #fff; transform: rotate(-4deg); }
.tag.free { background: var(--blue); color: #fff; }
.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ver { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.acts { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; }
.acts .btn { flex: 1; min-height: 46px; font-size: 16.5px; padding: 0 14px; box-shadow: 2px 2px 0 var(--line); border-width: 2px; }

/* ===== footer ===== */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 24px; padding-bottom: 36px; border-top: 2.5px solid var(--line); color: var(--muted); font-size: 14.5px; }

/* ===== responsive ===== */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 32px 26px 40px; }
  .phone { width: min(70%, 260px); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .hero { border-radius: 22px; box-shadow: 5px 5px 0 var(--line); padding: 26px 20px 34px; }
  .hero p { font-size: 17px; }
  .cta-row .btn { flex: 1 1 100%; }
  .btn-free { align-items: center; text-align: center; padding: 14px 18px; }
  .free-main { font-size: 26px; }
  .free-sticker { right: -8px; }
  .panel-head h2 { font-size: 26px; }
  .deal .btn { width: 100%; }
  .grid { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot { transition: none; }
  .btn, .btn:hover { transition: none; transform: none; }
  .btn-free { animation: none; }
}
