/* =========================================================
   PinTalks — styles (mobile-first, dark)
   ========================================================= */
:root {
  --bg: #0F0B16;
  --surface: #1A1424;
  --surface-2: #231B30;
  --line: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --muted: #B9B0C8;
  --purple: #7C3AED;
  --orange: #FF7A1A;
  --accent: #FF7A1A;          /* the one button color */
  --accent-ink: #1A0E05;
  --gradient: linear-gradient(120deg, var(--purple) 0%, #C2418F 50%, var(--orange) 100%);
  --radius: 16px;
  --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(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0; }
[hidden] { display: none !important; }

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

/* ---------- Shared ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(255, 122, 26, 0.3);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 30px rgba(255, 122, 26, 0.4); }

.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  color: #FFD3B0;
  background: rgba(255, 122, 26, 0.14);
  border: 1px solid rgba(255, 122, 26, 0.35);
  white-space: nowrap;
}

.link-arrow { font-weight: 600; font-size: 0.95rem; color: var(--orange); }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }

.h2 { font-size: clamp(1.7rem, 6vw, 2.3rem); margin-bottom: 6px; }
.h2::after {
  content: "";
  display: block;
  width: 48px; height: 4px;
  margin-top: 10px;
  border-radius: 4px;
  background: var(--gradient);
}
.lead { color: var(--muted); margin: 12px 0 28px; max-width: 60ch; }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 56px;
  background:
    radial-gradient(80% 60% at 15% 0%, rgba(124, 58, 237, 0.45), transparent 70%),
    radial-gradient(70% 60% at 100% 100%, rgba(255, 122, 26, 0.35), transparent 70%),
    var(--bg);
}
.hero__inner { display: grid; gap: 28px; align-items: center; }
.hero__photo {
  position: relative;
  width: min(68%, 280px);
  margin: 0 auto;
  border-radius: 24px;
  padding: 3px;
  background: var(--gradient);
  box-shadow: 0 20px 60px rgba(124, 58, 237, 0.35);
}
.hero__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 21px;
  background: var(--surface);
}
.hero__text { text-align: center; }
.hero__title {
  font-size: clamp(3rem, 15vw, 5.5rem);
  letter-spacing: -0.01em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 6px;
}
.hero__tagline {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  line-height: 1.45;
  margin: 12px 0 8px;
}
.hero__topics { color: var(--muted); font-size: 0.95rem; margin: 0 0 28px; }

/* ---------- 2. Videos ---------- */
.video-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.video-card { display: block; text-decoration: none; }
.video-card__thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.video-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;         /* crops hqdefault's letterbox bars to 16:9 */
  transition: transform .3s ease;
}
.video-card:hover .video-card__thumb img { transform: scale(1.04); }
.video-card__title { font-size: 1.05rem; font-weight: 600; margin-top: 10px; }
.video-card:hover .video-card__title { color: #FFD3B0; }

/* ---------- 3. Latency ---------- */
.soon-box {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 36px 20px;
  text-align: center;
}
.soon-box__text { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; margin: 14px 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-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.latency-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.latency-table th, .latency-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.latency-table th { font-family: var(--font-head); font-weight: 600; color: var(--muted); background: var(--surface-2); }
.latency-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- 4. Gear ---------- */
.gear-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.gear-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.gear-card:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, 0.4); }
.gear-card__img { aspect-ratio: 1; background: #fff; }
.gear-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.gear-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.gear-card__name { font-size: 1rem; font-weight: 600; }
.gear-card__note { margin: 4px 0 8px; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.gear-card .link-arrow { margin-top: auto; font-size: 0.88rem; }
.disclosure { margin: 20px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- 5. Games ---------- */
.game-card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 720px;
  transition: transform .15s ease, border-color .15s ease;
}
.game-card:hover { transform: translateY(-2px); border-color: rgba(255, 122, 26, 0.4); }
.game-card__art {
  aspect-ratio: 16 / 7;
  display: grid; place-items: center;
  background:
    radial-gradient(60% 90% at 20% 20%, rgba(124, 58, 237, 0.8), transparent 70%),
    radial-gradient(60% 90% at 85% 90%, rgba(255, 122, 26, 0.75), transparent 70%),
    var(--surface-2);
}
.game-card__logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 10vw, 3.4rem);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.game-card__body { padding: 18px 18px 20px; }
.game-card__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.game-card__title { font-size: 1.5rem; }
.game-card__body p { margin: 8px 0 12px; color: var(--muted); }

/* ---------- 6. Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; text-align: center; }
.footer__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 0 14px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.footer__links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer__links a {
  text-decoration: none;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .15s ease;
}
.footer__links a:hover { border-color: rgba(255, 122, 26, 0.5); }
.footer__copy { margin: 18px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Focus & motion ---------- */
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
@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); }
  .section { padding: 72px 0; }
}
@media (min-width: 860px) {
  .hero { padding: 72px 0 88px; }
  .hero__inner { grid-template-columns: 5fr 6fr; gap: 56px; }
  .hero__photo { margin: 0; width: min(100%, 420px); justify-self: end; }
  .hero__text { text-align: left; }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .gear-grid { grid-template-columns: repeat(4, 1fr); }
}
