/* =========================================================
   PinTalks — styles (mobile-first)
   ========================================================= */
:root {
  --ink: #111111;
  --paper: #FFFDF5;
  --paper-alt: #FFF4C2;
  --yellow: #FFD400;
  --red: #FF3B30;
  --muted: #555049;
  --border: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --radius: 14px;
  --font-head: "Kanit", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Shared bits ---------- */
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge--tilt { transform: rotate(-3deg); }
.badge--red { background: var(--red); color: #fff; border: 2px solid var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  padding: 14px 28px;
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.btn--yt { background: var(--red); color: #fff; }

.section { padding: 56px 0; }
.section--alt { background: var(--paper-alt); border-top: var(--border); border-bottom: var(--border); }

.h2 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; margin-bottom: 6px; }
/* thumbnail-style highlighter behind headings */
.hl {
  background: linear-gradient(transparent 55%, var(--yellow) 55%);
  padding: 0 4px;
}
.hl--red { background: linear-gradient(transparent 55%, #FFB3AD 55%); }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }

/* placeholder art for missing images */
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(45deg, #FFE45C 0 14px, var(--yellow) 14px 28px);
}
.ph span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  background: var(--ink);
  color: var(--yellow);
  padding: 2px 12px;
  border-radius: 8px;
  transform: rotate(-4deg);
}

/* ---------- 1. Hero ---------- */
.hero {
  background: var(--yellow);
  border-bottom: var(--border);
  padding: 48px 0 44px;
  text-align: center;
  overflow: hidden;
}
.hero__title {
  font-size: clamp(3.6rem, 20vw, 7rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 14px 0 12px;
  color: var(--ink);
  text-shadow: 4px 4px 0 #fff;
}
.hero__title span { color: var(--red); }
.hero__tagline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 1.4;
  margin: 0 0 26px;
}
.hero__sub { margin: 22px 0 0; font-size: 0.9rem; font-weight: 600; opacity: .75; }

/* ---------- 2. Videos ---------- */
.video-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.video-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.video-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-bottom: var(--border);
}
.video-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; right: 10px; bottom: 10px;
  width: 44px; height: 32px;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.play::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-left: 12px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.video-card__title { font-weight: 700; font-size: 1.1rem; padding: 12px 14px 14px; }

/* ---------- 3. Latency ---------- */
.soon-box {
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  background: #fff;
  padding: 36px 20px;
  text-align: center;
}
.soon-box__text { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; margin: 12px 0 4px; }
.soon-box__small { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ready for when the real table lands */
.table-scroll { overflow-x: auto; border: var(--border); border-radius: var(--radius); background: #fff; }
.latency-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.latency-table th, .latency-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #ddd; }
.latency-table th { font-family: var(--font-head); background: var(--ink); color: var(--yellow); }
.latency-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 4. Gear ---------- */
.gear-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.gear-card {
  display: flex;
  text-decoration: none;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gear-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.gear-card__img { flex: 0 0 104px; border-right: var(--border); background: var(--yellow); }
.gear-card__img img { width: 100%; height: 100%; object-fit: cover; }
.gear-card__img .ph span { font-size: 1.8rem; background: none; transform: none; }
.gear-card__body { padding: 12px 14px; }
.gear-card__name { font-size: 1.1rem; font-weight: 700; }
.gear-card__note { margin: 2px 0 6px; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.gear-card__cta { font-weight: 600; font-size: 0.9rem; color: #EE4D2D; }
.disclosure { margin: 20px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- 5. Games ---------- */
.game-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 720px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.game-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.badge--corner { position: absolute; top: 12px; right: 12px; z-index: 1; transform: rotate(4deg); }
.game-card__art {
  aspect-ratio: 16 / 7;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(0,0,0,.06) 22px 23px),
    #D9CBA3;
  border-bottom: var(--border);
}
.game-card__stamp {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 9vw, 3rem);
  color: var(--red);
  border: 4px solid var(--red);
  border-radius: 8px;
  padding: 0 14px;
  transform: rotate(-8deg);
  letter-spacing: 0.06em;
  opacity: .9;
}
.game-card__body { padding: 16px 18px 20px; }
.game-card__title { font-size: 1.6rem; font-weight: 800; }
.game-card__body p { margin: 6px 0 10px; color: var(--muted); }
.game-card__cta { font-family: var(--font-head); font-weight: 700; }

/* ---------- 6. Footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 40px 0; text-align: center; }
.footer__name { font-family: var(--font-head); font-weight: 800; font-style: italic; font-size: 2rem; margin: 0 0 12px; }
.footer__name span { color: var(--yellow); }
.footer__links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.footer__links a {
  text-decoration: none;
  font-weight: 600;
  padding: 8px 20px;
  border: 2px solid #fff;
  border-radius: 999px;
}
.footer__links a:hover { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.footer__copy { margin: 18px 0 0; font-size: 0.85rem; opacity: .6; }

/* ---------- Focus & motion ---------- */
a:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Bigger screens ---------- */
@media (min-width: 600px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
}
@media (min-width: 960px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}
