/* BDG game: white, yellow and black theme */
:root {
  --yellow: #ffc61a;
  --yellow-dark: #e0a800;
  --yellow-soft: #fff6d6;
  --amber-text: #7a5a00;
  --black: #111111;
  --ink: #1d1d1d;
  --muted: #5a5a5a;
  --line: #ececec;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; color: var(--black); }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }

/* Header */
.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--yellow);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}
.logo img { width: 48px; height: 48px; border-radius: 50%; }
.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--yellow); border-color: var(--yellow); }
.header-actions { display: flex; gap: 10px; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--yellow);
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 26px;
  border: 2px solid var(--yellow);
  transition: transform 0.15s ease, background 0.15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--black); }
.btn-primary:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); }
.btn-outline { background: transparent; color: var(--yellow); }
.btn-outline:hover { background: var(--yellow); color: var(--black); }
.btn-dark { background: var(--black); border-color: var(--black); color: var(--yellow); }
.btn-sm { padding: 8px 18px; font-size: 0.9rem; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 198, 26, 0.35), transparent 45%),
    linear-gradient(180deg, var(--yellow-soft), var(--white));
  padding: 64px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--black);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero-text { font-size: 1.1rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.hero-actions .btn-outline { color: var(--black); border-color: var(--black); }
.hero-actions .btn-outline:hover { background: var(--black); color: var(--yellow); }
.hero-media img {
  width: min(380px, 100%);
  margin-inline: auto;
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.page-hero { padding: 48px 0 40px; text-align: center; }
.page-hero .hero-text { max-width: 680px; margin-inline: auto; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: #fafafa; border-block: 1px solid var(--line); }
.section-dark { background: var(--black); color: #e8e8e8; }
.section-dark h2, .section-dark h3 { color: var(--yellow); }
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.section-heading p { color: var(--muted); }
.section-dark .section-heading p { color: #bdbdbd; }
.section-heading.left { text-align: left; margin-left: 0; }

/* Game cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.content-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.content-card:hover { transform: translateY(-4px); }
.card-image {
  background: linear-gradient(135deg, var(--black), #2b2b2b);
  border-bottom: 4px solid var(--yellow);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 170px;
  padding: 10px;
}
.card-image img { max-height: 150px; width: auto; }
.card-body { padding: 18px; flex: 1; }
.card-body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-label {
  display: inline-block;
  color: var(--amber-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Info boxes */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.info-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 4px solid var(--yellow);
  box-shadow: var(--shadow);
}
.section-dark .info-box { background: #1b1b1b; box-shadow: none; }
.info-box p:last-child { margin-bottom: 0; }
.info-box ul { margin: 0; padding-left: 20px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step {
  display: flex;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.step-number {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* Notice */
.notice {
  background: var(--yellow-soft);
  border-left: 5px solid var(--yellow-dark);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
}
.notice p:last-child { margin: 0; }

/* Blog */
.post-list { display: grid; gap: 28px; }
.post {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  scroll-margin-top: 100px;
}
.post-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.post-meta span {
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 8px;
}
.post ul, .post ol { padding-left: 22px; margin: 0 0 1em; }
.post li { margin-bottom: 4px; }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.toc a {
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--yellow-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 500;
}
.toc a:hover { background: var(--yellow); }

/* FAQ */
details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
summary { cursor: pointer; font-weight: 600; color: var(--black); }
details[open] summary { color: var(--amber-text); margin-bottom: 8px; }
details p { margin: 0; color: var(--muted); }

/* CTA */
.cta-section { background: var(--yellow); padding: 48px 0; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-inner h2 { margin-bottom: 6px; }
.cta-inner p { margin: 0; }
.cta-inner .eyebrow { background: var(--black); }

/* Footer */
.site-footer { background: var(--black); color: #bdbdbd; padding: 48px 0 20px; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--yellow); font-size: 1rem; }
.site-footer a { display: block; color: #e0e0e0; text-decoration: none; margin-bottom: 6px; }
.site-footer a:hover { color: var(--yellow); }
.footer-brand .logo { display: inline-flex; margin-bottom: 12px; }
.footer-bottom {
  border-top: 1px solid #2c2c2c;
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}
.age-badge {
  display: inline-block;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  line-height: 34px;
  text-align: center;
  font-weight: 800;
  margin-right: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle { display: block; margin-left: auto; order: 3; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--black);
    padding: 8px 16px 16px;
    border-top: 1px solid #2c2c2c;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; }
  .header-actions { margin-left: auto; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { width: 220px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .logo span { display: none; }
  .header-inner { gap: 10px; }
  .btn-sm { padding: 7px 12px; font-size: 0.82rem; }
  .hero { padding: 24px 0 40px; }
  .hero-grid { gap: 16px; }
  .hero-media img { width: 140px; }
  .hero h1 { margin-bottom: 0; }
  .hero-actions { margin: 16px 0 20px; flex-wrap: nowrap; }
  .hero-actions .btn { flex: 1 1 0; justify-content: center; text-align: center; white-space: nowrap; padding-inline: 12px; }
  .section { padding: 48px 0; }
  .post { padding: 20px; }
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 8px 14px;
  z-index: 100;
  border-radius: 6px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow-dark); outline-offset: 2px; }
.section-dark a { color: var(--yellow); }
.center { text-align: center; }

@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-image { height: 120px; }
  .card-image img { max-height: 105px; }
  .card-body { padding: 12px; }
  .card-body p { font-size: 0.85rem; }
}

/* Blog posts added from the admin panel */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.post-card-image { display: block; aspect-ratio: 1200 / 630; background: var(--black); border-bottom: 4px solid var(--yellow); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 { font-size: 1.15rem; }
.post-card-body h3 a { text-decoration: none; }
.post-card-body h3 a:hover { color: var(--amber-text); }
.post-card-body > p:not(.post-meta) { color: var(--muted); font-size: 0.95rem; }
.read-more { margin-top: auto; font-weight: 700; color: var(--amber-text); text-decoration: none; }
.read-more::after { content: " →"; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.article-hero { text-align: left; padding-bottom: 32px; }
.article-hero .hero-text { margin-inline: 0; }
.breadcrumb { font-size: 0.88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--amber-text); text-decoration: none; font-weight: 600; }
.article-body { padding-bottom: 48px; }
.article-image { margin: 0 0 28px; }
.article-image img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); border-bottom: 4px solid var(--yellow); }
.post h2 { font-size: 1.45rem; margin-top: 1.2em; }
.post h3 { margin-top: 1em; }
.post > :first-child { margin-top: 0; }
.post img { border-radius: 10px; margin: 8px 0 16px; }
.post a { color: var(--amber-text); font-weight: 600; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related-list li { border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 8px; padding: 12px 16px; }
.related-list a { font-weight: 600; text-decoration: none; }
.related-list a:hover { color: var(--amber-text); }
.related-list span { display: block; font-size: 0.85rem; color: var(--muted); }
.draft-banner { background: var(--black); color: var(--yellow); text-align: center; font-weight: 600; padding: 10px 16px; }

@media (max-width: 520px) {
  .post-grid { grid-template-columns: 1fr; gap: 18px; }
  .post-card-body { padding: 16px; }
}
