/* =============================================================
   BDG Game – Main Stylesheet
   Dark background + gold accent theme | Target: <15KB
   ============================================================= */

/* 1. Reset
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

/* 2. Design Tokens
   ============================================================= */
:root {
  --bg-primary:    #0d0d1a;
  --bg-secondary:  #0a0a18;
  --bg-tertiary:   #08081a;
  --bg-card:       rgba(255,255,255,0.02);
  --bg-card-hover: rgba(255,255,255,0.04);
  --border-subtle: rgba(255,255,255,0.04);
  --gold:          #d4a843;
  --gold-dark:     #b8922e;
  --gold-glow:     rgba(212,168,67,0.15);
  --gold-border:   rgba(212,168,67,0.2);
  --text-white:    #ffffff;
  --text-light:    #bbbbbb;
  --text-muted:    #999999;
  --text-dim:      #666666;
  --text-faint:    #555555;
  --font-stack:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --max-width:     900px;
  --nav-height:    60px;
}

html {
  scroll-behavior: smooth;
}

/* 3. Base Styles
   ============================================================= */
body {
  background-color: var(--bg-primary);
  color: var(--text-light);
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.7;
}

/* 4. Typography
   ============================================================= */
h1 {
  font-size: 2rem;
  color: var(--text-white);
  margin-top: 0;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.4rem;
  color: var(--text-white);
  border-left: 3px solid var(--gold);
  padding-left: 14px;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

h3 {
  font-size: 1.15rem;
  color: var(--text-white);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  margin-top: 0;
  max-width: 75ch;
}

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

a:hover {
  text-decoration: underline;
}

/* Contextual links inside paragraphs and list items need underline for accessibility */
p a, li a {
  text-decoration: underline;
  text-decoration-color: rgba(212,168,67,0.4);
  text-underline-offset: 2px;
}

p a:hover, li a:hover {
  text-decoration-color: var(--gold);
}

/* 5. Layout
   ============================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-content {
  padding-bottom: 3rem;
  padding-top: 0.5rem;
}

/* 6. Navigation
   ============================================================= */
.site-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--gold-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
  padding: 0 24px;
}

.nav-logo {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  text-decoration: none;
}

.nav-buttons {
  display: flex;
  gap: 8px;
}

.btn-register {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  display: inline-block;
}

.btn-register:hover {
  text-decoration: none;
  opacity: 0.9;
}

.btn-login {
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.8rem;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

.btn-login:hover {
  text-decoration: none;
  background: var(--gold-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* 7. Breadcrumbs
   ============================================================= */
.breadcrumbs {
  padding: 14px 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs .current,
.breadcrumbs > span:last-child {
  color: var(--gold);
}

/* 8. Hero
   ============================================================= */
/* .hero is used on pages WITH breadcrumbs (download, login, etc.) */
.hero {
  padding: 1rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}

/* .hero-section is used on homepage (NO breadcrumbs) */
.hero-section {
  padding: 3rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}

.hero-label {
  color: var(--gold);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  display: inline-block;
  margin-bottom: 1rem;
  background: var(--gold-glow);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--gold-border);
}

.hero h1,
.hero-section h1 {
  font-size: 2.25rem;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

.hero p,
.hero-section p,
.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-buttons .btn-register {
  padding: 12px 28px;
  font-size: 0.9rem;
}

.hero-buttons .btn-login {
  padding: 12px 28px;
  font-size: 0.9rem;
}

/* 9. Content Sections
   ============================================================= */
.content-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.content-section:last-of-type {
  border-bottom: none;
}

/* 10. Step Items
    ============================================================= */
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
  transition: background 0.2s;
}

.step-item:hover {
  background: var(--bg-card-hover);
}

.step-number {
  background: var(--gold-glow);
  color: var(--gold);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content h3 {
  margin: 0;
  font-size: 0.95rem;
}

.step-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 11. CTA Block
    ============================================================= */
.cta-block {
  background: linear-gradient(135deg, var(--gold-glow), rgba(212,168,67,0.05));
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  margin: 3rem 0;
}

.cta-block h2 {
  border-left: none;
  padding-left: 0;
}

/* 12. FAQ
    ============================================================= */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--gold-border);
}

.faq-item.active {
  border-color: var(--gold-border);
  background: var(--bg-card-hover);
}

.faq-question {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-white);
  font-weight: 700;
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
}

.faq-question::after {
  content: '+';
  color: var(--gold);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-left: 8px;
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-bottom 0.3s ease;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 14px;
}

/* 13. Invite Code Box
    ============================================================= */
.invite-code-box {
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.invite-code-box .code {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 3px;
  margin: 0.5rem 0;
  display: block;
}

/* 14. Table of Contents
    ============================================================= */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc h3 {
  margin-top: 0;
}

.toc ol {
  padding-left: 1.2rem;
  margin: 0;
}

.toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--gold);
}

/* 15. Footer
    ============================================================= */
.site-footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  color: #9a9a9a;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  color: #9a9a9a;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-col p {
  font-size: 0.8rem;
  color: #8a8a8a;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #8a8a8a;
}

/* 16. Responsive – max-width 768px
    ============================================================= */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--gold-border);
    padding: 16px 24px;
    gap: 12px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-buttons .btn-login {
    display: none;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 1rem 0 1.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-section {
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
  }

  .hero h1,
  .hero-section h1 {
    font-size: 1.6rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons a,
  .hero-buttons .btn-register,
  .hero-buttons .btn-login {
    text-align: center;
    padding: 12px 20px;
  }

  .content-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
