/* Hexgate Shared Styles */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #c8aa6e;
  --gold-bright: #e8d5a3;
  --gold-light: #f0dfa0;
  --gold-dark: #9a7b4f;
  --bg-deep: #121016;
  --bg-card: rgba(30, 28, 36, 0.6);
  --bg-card-hover: rgba(40, 37, 48, 0.7);
  --text-primary: #e0dbd2;
  --text-muted: rgba(255, 255, 255, 0.45);
  --text-dim: rgba(255, 255, 255, 0.25);
  --gold-glow: rgba(200, 170, 110, 0.15);
  --gold-border: rgba(200, 170, 110, 0.12);
  --gold-border-hover: rgba(200, 170, 110, 0.25);
  --section-gap: 120px;
}

html, body { height: 100%; overflow: hidden; }

/* Scroll wrapper — keeps scrollbar below fixed nav */
.scroll-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-x: clip; /* iOS: clip doesn't create scroll on x-axis */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Custom scrollbar (scoped to scroll wrapper + inner scrollable elements) */
.scroll-wrapper::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-wrapper::-webkit-scrollbar-track { background: transparent; }
.scroll-wrapper::-webkit-scrollbar-thumb { background: rgba(200,170,110,0.2); border-radius: 3px; }
.scroll-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(200,170,110,0.4); }
.scroll-wrapper { scrollbar-width: thin; scrollbar-color: rgba(200,170,110,0.2) transparent; }
/* Keep scrollbar styles for inner scrollable elements (tables etc) */
*:not(.scroll-wrapper)::-webkit-scrollbar { width: 4px; height: 4px; }
*:not(.scroll-wrapper)::-webkit-scrollbar-track { background: transparent; }
*:not(.scroll-wrapper)::-webkit-scrollbar-thumb { background: rgba(200,170,110,0.15); border-radius: 2px; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Hex Grid Background */
.hex-bg { position: fixed; inset: 0; z-index: 0; opacity: 0.4; pointer-events: none; }
.hex-bg svg { width: 100%; height: 100%; }

/* Ambient Glow Orbs */
.glow-orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(80px); }
.glow-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(200,170,110,0.08), transparent 70%); top: -200px; right: -100px; animation: orbFloat 12s ease-in-out infinite; }
.glow-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(200,170,110,0.06), transparent 70%); bottom: 20%; left: -150px; animation: orbFloat 15s ease-in-out infinite reverse; }
.glow-orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(200,170,110,0.05), transparent 70%); top: 50%; right: -100px; animation: orbFloat 18s ease-in-out infinite 3s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 20px); }
  66% { transform: translate(20px, -30px); }
}

/* Shared Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
section { position: relative; z-index: 1; }

.section-label {
  text-transform: uppercase; font-size: 11px; font-weight: 600;
  letter-spacing: 3px; color: var(--gold); opacity: 0.7; margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.15; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 30%, var(--gold-bright) 55%, var(--gold) 75%, var(--gold-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.section-subtitle { font-size: 17px; color: var(--text-muted); max-width: 560px; line-height: 1.7; }

.gold-divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-border-hover), transparent);
  margin: var(--section-gap) 0;
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; font-size: 15px; font-weight: 700; font-family: inherit;
  color: #000; background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  border: none; border-radius: 8px; cursor: pointer; text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform 0.6s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(200,170,110,0.3), 0 0 60px rgba(200,170,110,0.1);
}
.btn-primary:hover::after { transform: translateX(100%); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; font-size: 14px; font-weight: 600; font-family: inherit;
  color: var(--gold); background: rgba(200,170,110,0.06);
  border: 1px solid var(--gold-border); border-radius: 8px;
  cursor: pointer; text-decoration: none; transition: all 0.3s ease;
}
.btn-secondary:hover { background: rgba(200,170,110,0.1); border-color: var(--gold-border-hover); }

/* Nav */
nav {
  position: relative; z-index: 100; flex-shrink: 0;
  padding: 16px 0; background: var(--bg-deep);
  border-bottom: 1px solid rgba(200,170,110,0.06); transition: all 0.3s ease;
}
nav.scrolled { padding: 12px 0; border-bottom-color: rgba(200,170,110,0.1); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand svg { width: 28px; height: 28px; }
.nav-brand-text {
  font-size: 16px; font-weight: 700; letter-spacing: 4px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-bright), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none; letter-spacing: 0.5px; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  padding: 9px 20px !important; font-size: 13px !important;
  font-weight: 800 !important; border-radius: 6px !important; color: #2a2015 !important;
}

/* Footer */
footer { border-top: 1px solid var(--gold-border); padding: 24px 0; position: relative; z-index: 1; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left svg { width: 20px; height: 20px; }
.footer-text { font-size: 12px; color: var(--text-dim); }
.footer-sep { color: var(--text-dim); font-size: 12px; }
.footer-link { font-size: 12px; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--gold); }
.footer-discord { font-size: 12px; color: var(--text-dim); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.footer-discord:hover { color: rgba(114, 137, 218, 0.8); }
.footer-discord svg { width: 14px; height: 14px; }
.footer-right { font-size: 11px; color: var(--text-dim); max-width: 500px; text-align: right; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links .nav-link-text { display: none; }
  .nav-links { gap: 0; }
  .page-hero { text-align: center; padding: 40px 0 40px; }
  .page-hero p { margin-left: auto; margin-right: auto; }
  .section-label, .section-title, .section-subtitle { text-align: center; }
  .section-subtitle { margin-left: auto; margin-right: auto; }
  .gold-divider { margin: 60px 0; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-wrap: wrap; justify-content: center; }
  .footer-right { text-align: center; }
  /* Hide scrollbar on mobile — users scroll by touch */
  .scroll-wrapper::-webkit-scrollbar { display: none; }
  .scroll-wrapper { scrollbar-width: none; }
}

/* Shared page hero (subpages) */
.page-hero { padding: 80px 0 60px; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 48px); font-weight: 800; line-height: 1.15; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 30%, var(--gold-bright) 55%, var(--gold) 75%, var(--gold-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-hero p { font-size: 18px; color: var(--text-muted); max-width: 600px; line-height: 1.7; }

/* Related Guides (shared across blog articles) */
.related-articles { margin: 56px 0 0; padding-top: 40px; border-top: 1px solid var(--gold-border); }
.related-articles h3 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 3px;
  color: var(--gold); opacity: 0.7; margin-bottom: 20px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card {
  display: flex; flex-direction: column; text-decoration: none !important; padding: 20px;
  background: var(--bg-card); border: 1px solid var(--gold-border); border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.article-body .related-card { text-decoration: none !important; }
.related-card:hover {
  border-color: var(--gold-border-hover); background: var(--bg-card-hover);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.related-card .related-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: var(--gold); opacity: 0.6; margin-bottom: 10px;
}
.related-card .related-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 8px;
}
.related-card .related-desc {
  font-size: 12px; color: var(--text-dim); line-height: 1.5; flex: 1;
}
.related-card .related-arrow {
  font-size: 12px; color: var(--gold); margin-top: 12px; opacity: 0;
  transition: opacity 0.2s, transform 0.2s; transform: translateX(-4px);
}
.related-card:hover .related-arrow { opacity: 1; transform: translateX(0); }
@media (max-width: 768px) {
  .related-grid { grid-template-columns: 1fr; }
}
