/* static-pages.css — shared styles for all non-game pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --border: rgba(255,255,255,0.08);
  --text: #f1f1f3;
  --text2: #a0a0b0;
  --text3: #606075;
  --purple: #6366f1;
  --purple-light: #818cf8;
  --correct: #5b9a8b;
  --present: #c4a565;
  --absent: #3a3a4a;
  --r: 12px;
  --max: 780px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ─────────────────────────────────────────────────── */
.sp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.sp-logo {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.sp-logo span { color: var(--purple); }

.sp-nav-links {
  display: flex;
  gap: 0.25rem;
}

.sp-nav-links a {
  padding: 0.45rem 0.85rem;
  color: var(--text2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.sp-nav-links a:hover,
.sp-nav-links a.active {
  background: rgba(99,102,241,0.12);
  color: var(--text);
}

/* ── MAIN / ARTICLE ──────────────────────────────────────── */
.sp-main {
  flex: 1;
  padding: 2.5rem 1.5rem 4rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
  width: 100%;
}

.sp-article {
  max-width: var(--max);
  margin: 0 auto;
}

.sp-article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.sp-breadcrumb {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 1rem;
}

.sp-breadcrumb a {
  color: var(--text3);
  text-decoration: none;
  transition: color 0.15s;
}

.sp-breadcrumb a:hover { color: var(--text); }

.sp-article h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--text);
  margin: 0.75rem 0 1rem;
  letter-spacing: -0.5px;
}

.sp-lead {
  font-size: 1.1rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 600px;
}

.sp-meta {
  font-size: 0.82rem;
  color: var(--text3);
  margin-top: 0.5rem;
}

/* ── CONTENT ─────────────────────────────────────────────── */
.sp-article section {
  margin-bottom: 2.25rem;
}

.sp-article h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.85rem;
  margin-top: 0.25rem;
}

.sp-article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  margin-top: 1.25rem;
}

.sp-article p {
  color: var(--text2);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.sp-article p strong {
  color: var(--text);
  font-weight: 600;
}

.sp-article ul, .sp-article ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.sp-article li {
  color: var(--text2);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.sp-article a {
  color: var(--purple-light);
  text-decoration: none;
}

.sp-article a:hover { text-decoration: underline; }

/* ── BLOG TAG ─────────────────────────────────────────────── */
.blog-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.75rem;
  background: rgba(99,102,241,0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  border: 1px solid rgba(99,102,241,0.2);
}

/* ── BLOG INDEX GRID ──────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.blog-card-link {
  text-decoration: none;
  display: block;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  height: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
}

.blog-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.blog-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.5rem 0 0.6rem;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-read {
  font-size: 0.75rem;
  color: var(--text3);
}

/* ── COLOR GUIDE (how to play) ────────────────────────────── */
.sp-color-guide {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.sp-color-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.sp-tile {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
  font-family: monospace;
}

.sp-correct { background: var(--correct); }
.sp-present { background: var(--present); }
.sp-absent  { background: #444; }

.sp-color-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.sp-color-item p {
  font-size: 0.85rem;
  color: var(--text2);
  margin: 0;
}

/* ── CONTACT CARD ────────────────────────────────────────── */
.sp-contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.sp-contact-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sp-contact-item a {
  font-size: 1rem;
  color: var(--purple-light);
}

/* ── POST NAV ────────────────────────────────────────────── */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.post-nav-link {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}

.post-nav-link:hover {
  border-color: var(--purple);
  color: var(--text);
}

.post-nav-next { margin-left: auto; }

/* ── CTA ─────────────────────────────────────────────────── */
.sp-cta {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(129,140,248,0.06));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--r);
  padding: 2rem 1.75rem;
  text-align: center;
  margin-top: 2.5rem;
}

.sp-cta h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.sp-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.sp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99,102,241,0.45);
  text-decoration: none;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.sp-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.sp-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin-bottom: 1rem;
}

.sp-footer-links a {
  color: var(--text3);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color 0.15s;
}

.sp-footer-links a:hover { color: var(--text); }

.sp-footer p {
  font-size: 0.78rem;
  color: var(--text3);
  margin: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .sp-nav { padding: 0 1rem; }
  .sp-nav-links a { padding: 0.4rem 0.6rem; font-size: 0.82rem; }
  .sp-main { padding: 1.5rem 1rem 3rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .sp-color-item { padding: 0.85rem; }
  .sp-tile { width: 44px; height: 44px; font-size: 1.1rem; }
}

@media (max-width: 400px) {
  .sp-nav-links { gap: 0; }
  .sp-nav-links a { font-size: 0.78rem; padding: 0.35rem 0.5rem; }
}

/* ─── RELATED POSTS ──────────────────────────────────────── */
.related-posts {
  margin: 2rem 0 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.related-posts h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 1rem;
}

.related-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.related-post-link {
  display: block;
  color: var(--purple-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.related-post-link:last-child { border-bottom: none; }
.related-post-link:hover { color: white; text-decoration: none; }
