/* ==========================================================================
   5PTS Games — site-wide design system
   Dark & bold. The studio is black & white (like the logo);
   the games bring the color: --dino (green) --titan (amber) --hook (cyan).
   ========================================================================== */

:root {
  --bg: #0a0c0f;
  --bg-2: #0d1013;
  --surface: #13171b;
  --surface-2: #191e24;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #f2f5f7;
  --sub: #9aa4ae;
  --faint: #67717c;

  --dino: #5fd66e;
  --titan: #ffab2e;
  --hook: #3fc6ff;
  --acc: #f2f5f7; /* default accent = studio white; game themes override */

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1120px;
  --radius: 18px;
}

/* Per-game theme scopes — set on any wrapper */
.t-dino  { --acc: var(--dino); }
.t-titan { --acc: var(--titan); }
.t-hook  { --acc: var(--hook); }

/* ---------- Reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration: none; }

::selection { background: rgba(255, 255, 255, 0.9); color: #0a0c0f; }

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

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: #0a0c0f; font-weight: 600;
  padding: 10px 16px; border-radius: 0 0 10px 10px; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

main { flex: 1; }

/* ---------- Type ---------- */

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

.display {
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.lede { color: var(--sub); font-size: clamp(1.02rem, 1.6vw, 1.15rem); line-height: 1.7; max-width: 620px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--acc);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--acc); flex: none; }

/* ---------- Buttons / badges ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.25s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn-primary { background: var(--ink); color: #0a0c0f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(255, 255, 255, 0.25); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.btn-acc { background: var(--acc); color: #0a0c0f; }
.btn-acc:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -10px color-mix(in srgb, var(--acc) 55%, transparent); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; border-radius: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--acc);
  background: color-mix(in srgb, var(--acc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
  padding: 7px 13px;
  align-self: flex-start; /* never stretch inside flex columns */
  /* chamfered corners — echoes the blocky logo */
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.badge::before { content: ""; width: 6px; height: 6px; background: var(--acc); flex: none; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 15, 0.8);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-link { color: var(--sub); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; }
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { content: ""; display: block; height: 2px; background: var(--acc); margin-top: 2px; }

.nav-burger {
  display: none; background: none; border: 0; cursor: pointer; padding: 10px;
  flex-direction: column; gap: 5px;
}
.nav-burger span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.25s, opacity 0.25s; }

@media (max-width: 780px) {
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 10px 24px 18px;
  }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 12px; }
  .nav-link { display: block; padding: 14px 2px; font-size: 1.02rem; }
  .nav-link.active::after { display: none; }
  .nav[data-open="true"] .nav-links { display: flex; }
  .nav[data-open="true"] .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-open="true"] .nav-burger span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-burger { display: flex; }
}

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: clamp(84px, 11vw, 140px) 0 clamp(64px, 8vw, 100px); }

.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 30%, transparent 75%);
}

.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.14; pointer-events: none; }
.orb-dino  { width: 420px; height: 420px; background: var(--dino);  top: -140px; left: -120px; }
.orb-titan { width: 380px; height: 380px; background: var(--titan); top: -80px;  right: -140px; }
.orb-hook  { width: 420px; height: 420px; background: var(--hook);  bottom: -220px; left: 34%; opacity: 0.1; }

.hero .container { position: relative; }

.hero-sticker {
  width: clamp(180px, 24vw, 250px);
  transform: rotate(-2.5deg);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 44px; }
.fact {
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 500;
  color: var(--sub); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; background: rgba(255, 255, 255, 0.02);
}

/* ---------- Sections ---------- */

.section { padding: clamp(60px, 8.5vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-head { margin-bottom: clamp(30px, 5vw, 48px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.section-head h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; }
.section-head .lede { max-width: 560px; }

.divider { border: 0; border-top: 1px solid var(--line); }

/* ---------- Game cards (home) ---------- */

.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 980px) { .games-grid { grid-template-columns: 1fr; max-width: 560px; } }

.game-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s, box-shadow 0.35s;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--acc) 45%, transparent);
  box-shadow: 0 28px 64px -28px color-mix(in srgb, var(--acc) 40%, transparent);
}
.game-card::before { content: ""; display: block; height: 4px; background: var(--acc); opacity: 0.85; }
.game-body { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-title-row { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
.game-body h3 { font-size: 1.5rem; letter-spacing: -0.02em; }
.game-body p { color: var(--sub); font-size: 0.94rem; line-height: 1.65; flex: 1; }
.game-more {
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem; color: var(--acc);
  display: inline-flex; align-items: center; gap: 7px;
}
.game-more::after { content: "→"; transition: transform 0.25s; }
.game-card:hover .game-more::after { transform: translateX(4px); }

/* ---------- Game page ---------- */

.page-hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); }
.crumb { font-size: 0.85rem; color: var(--faint); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; }
.crumb a { color: var(--faint); transition: color 0.2s; }
.crumb a:hover { color: var(--ink); }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.7rem); letter-spacing: -0.035em; margin: 14px 0 16px; }
.page-hero .lede { max-width: 640px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px;
}
.feature-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 13%, transparent);
  color: var(--acc);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  margin-bottom: 4px;
}
.feature h4 { font-size: 1.02rem; }
.feature p { color: var(--sub); font-size: 0.9rem; line-height: 1.6; }

.meta-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Generic cards / strips ---------- */

.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(28px, 5vw, 52px);
  position: relative; overflow: hidden;
}
.panel-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.panel-center .lede { margin: 0 auto; }

.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.fact-list { list-style: none; display: flex; flex-direction: column; }
.fact-list li {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k { color: var(--faint); flex: none; }
.fact-list .v { color: var(--ink); text-align: right; word-break: break-word; }
.fact-list .v a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.fact-list .v a:hover { text-decoration-color: var(--ink); }

/* ---------- Support / FAQ ---------- */

.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.support-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.3s, transform 0.3s;
}
.support-card:hover { border-color: color-mix(in srgb, var(--acc) 40%, transparent); transform: translateY(-3px); }
.support-card h3 { font-size: 1.15rem; }
.support-card p { color: var(--sub); font-size: 0.9rem; flex: 1; }
.support-card .btn { align-self: flex-start; margin-top: 6px; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 1.05rem;
  padding: 20px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--faint); transition: transform 0.25s; flex: none; }
.faq[open] summary::after { transform: rotate(45deg); color: var(--acc); }
.faq .faq-body { padding: 0 0 20px; color: var(--sub); font-size: 0.95rem; line-height: 1.7; max-width: 700px; }
.faq .faq-body a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Legal prose ---------- */

.prose { max-width: 780px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); letter-spacing: -0.03em; margin-bottom: 8px; }
.prose .date { color: var(--faint); font-size: 0.9rem; margin-bottom: 30px; }
.prose h2 { font-size: 1.3rem; margin: 40px 0 12px; letter-spacing: -0.015em; }
.prose h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--sub); font-size: 0.98rem; line-height: 1.75; }
.prose p + p { margin-top: 12px; }
.prose ul, .prose ol { padding-left: 24px; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose .notice {
  background: color-mix(in srgb, var(--acc) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent);
  border-radius: 14px; padding: 18px 22px; margin: 20px 0;
}
.prose .notice p { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); color: var(--sub); vertical-align: top; }
.prose th { color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); background: #08090b; padding: 56px 0 30px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { height: 26px; width: auto; margin-bottom: 16px; }
.footer-brand p { color: var(--faint); font-size: 0.88rem; max-width: 260px; line-height: 1.6; }
.footer-brand a { color: var(--sub); font-size: 0.88rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.footer-brand a:hover { color: var(--ink); }
.footer h4 {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--sub); font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.83rem;
}

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001s !important; animation-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Scrollbar (subtle) ---------- */

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23292f; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2e353d; }
