/* ═══════════════════════════════════════════════════════════════
   ASTRE — Shared Stylesheet
   Used by: all pages (index, help, glossary, guides, contact, legal)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --navy:        #0B1220;
  --charcoal:    #111827;
  --slate:       #1F2937;
  --slate-light: #374151;
  --blue:        #2D7FF9;
  --blue-dim:    rgba(45,127,249,0.12);
  --blue-glow:   rgba(45,127,249,0.25);
  --green:       #22C55E;
  --red:         #EF4444;
  --gray:        #E5E7EB;
  --muted:       #9CA3AF;
  --border:      rgba(255,255,255,0.07);
  --border-blue: rgba(45,127,249,0.3);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy);
  color: var(--gray);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: 'Sora', sans-serif; line-height: 1.2; }
a { color: var(--blue); text-decoration: none; }
a:hover { opacity: 0.85; }
img { max-width: 100%; display: block; }

/* ─── Layout ────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ─── Typography Utilities ──────────────────────────────────── */
.text-blue  { color: var(--blue); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-muted { color: var(--muted); }
.text-white { color: #fff; }

.section-label {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 24px rgba(45,127,249,0.35);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(45,127,249,0.5); }
.btn-outline {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ─── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-blue  { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--border-blue); }
.badge-green { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-gray  { background: rgba(156,163,175,0.1); color: var(--muted); border: 1px solid rgba(156,163,175,0.2); }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-blue); transform: translateY(-3px); }

/* ─── NAV ───────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,18,32,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 10px 20px; font-size: 14px; }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--charcoal);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.7;
}
.footer-col-title {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-legal { font-size: 12px; color: var(--muted); line-height: 1.6; max-width: 600px; }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { font-size: 12px; color: var(--muted); transition: color 0.15s; }
.footer-bottom-links a:hover { color: var(--gray); }

/* ─── PAGE HERO (inner pages) ───────────────────────────────── */
.page-hero {
  padding: 120px 0 64px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(45,127,249,0.12) 0%, transparent 60%);
}
.page-hero .section-label { margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; color: #fff; margin-bottom: 16px; }
.page-hero p { font-size: 18px; color: var(--muted); max-width: 560px; line-height: 1.7; }

/* ─── BREADCRUMB ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); transition: color 0.15s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: var(--slate-light); }
.breadcrumb .current { color: var(--gray); }

/* ─── ARTICLE PROSE ─────────────────────────────────────────── */
.prose { font-size: 16px; line-height: 1.8; color: var(--muted); }
.prose h2 { font-size: 24px; font-weight: 700; color: #fff; margin: 40px 0 16px; }
.prose h3 { font-size: 19px; font-weight: 600; color: #fff; margin: 28px 0 12px; }
.prose p { margin-bottom: 20px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose li { color: var(--muted); }
.prose strong { color: var(--gray); font-weight: 600; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(45,127,249,0.4); }
.prose a:hover { text-decoration-color: var(--blue); }
.prose .callout {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 15px;
}
.prose .callout.green { border-left-color: var(--green); }
.prose .callout.red   { border-left-color: var(--red); }
.prose .callout p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 14px; }
.prose th { background: var(--slate); color: #fff; font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 16px; text-align: left; }
.prose td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.prose tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── STAT CHIPS ────────────────────────────────────────────── */
.stat-chips { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.stat-chip {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: center;
  min-width: 100px;
}
.stat-chip-value { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.stat-chip-label { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ─── SEARCH BAR ────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 520px;
}
.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 14px 46px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--border-blue); }

/* ─── ARTICLE LAYOUT ────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 64px 0 80px;
  align-items: start;
}
.article-sidebar {
  position: sticky;
  top: 80px;
}
.sidebar-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-links a { font-size: 14px; color: var(--muted); transition: color 0.15s; }
.sidebar-links a:hover { color: var(--blue); }

/* ─── CATEGORY GRID ─────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.category-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
}
.category-card:hover { border-color: var(--border-blue); transform: translateY(-3px); opacity: 1; }
.category-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--blue-dim);
  border: 1px solid var(--border-blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.category-card h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.category-card p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.category-count { font-size: 12px; color: var(--blue); margin-top: 12px; font-weight: 600; }

/* ─── ARTICLE LIST ──────────────────────────────────────────── */
.article-list { list-style: none; display: flex; flex-direction: column; }
.article-list li { border-bottom: 1px solid var(--border); }
.article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  color: var(--gray);
  font-size: 15px;
  transition: color 0.15s;
  text-decoration: none;
}
.article-list a:hover { color: var(--blue); opacity: 1; }
.article-list a svg { flex-shrink: 0; opacity: 0.4; transition: opacity 0.15s; }
.article-list a:hover svg { opacity: 1; }

/* ─── GLOSSARY GRID ─────────────────────────────────────────── */
.alpha-section { margin-bottom: 48px; }
.alpha-letter {
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.glossary-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.glossary-list a {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}
.glossary-list a:hover { background: var(--charcoal); opacity: 1; }
.glossary-term { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; color: #fff; min-width: 180px; }
.glossary-def { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ─── ALPHA NAV ─────────────────────────────────────────────── */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 40px;
}
.alpha-nav a {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--charcoal);
  border: 1px solid var(--border);
  transition: all 0.15s;
  text-decoration: none;
}
.alpha-nav a:hover, .alpha-nav a.active { background: var(--blue); color: #fff; border-color: var(--blue); opacity: 1; }

/* ─── GUIDE CARDS ───────────────────────────────────────────── */
.guide-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}
.guide-card:hover { border-color: var(--border-blue); transform: translateY(-3px); opacity: 1; }
.guide-difficulty {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.diff-beginner  { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.diff-intermediate { background: rgba(45,127,249,0.1); color: var(--blue); border: 1px solid rgba(45,127,249,0.3); }
.diff-advanced  { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.guide-card h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.guide-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.guide-meta { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }

/* ─── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 100px 0 48px; }
  .article-layout { padding: 40px 0 60px; }
}
