/* ============================================
   RangeHunterPro V2 — Design System
   Dark theme with gold accents
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --bg-card-hover: #1c1c28;
  --bg-input: #1a1a24;
  --border-color: #2a2a3a;
  --border-gold: #FFD70033;

  --gold: #FFD700;
  --gold-light: #FFE44D;
  --gold-dark: #CC9900;
  --gold-muted: #B8860B;
  --gold-glow: rgba(255, 215, 0, 0.15);
  --gold-gradient: linear-gradient(135deg, #FFD700, #FFA500);
  --gold-gradient-hover: linear-gradient(135deg, #FFE44D, #FFB833);

  --green: #22C55E;
  --green-muted: #16A34A;
  --red: #EF4444;
  --red-muted: #DC2626;
  --blue: #3B82F6;

  --text-primary: #F1F1F1;
  --text-secondary: #A0A0B8;
  --text-muted: #6B6B80;
  --text-gold: #FFD700;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.6);
  --shadow-gold: 0 4px 20px rgba(255, 215, 0, 0.15);
  --shadow-gold-lg: 0 8px 40px rgba(255, 215, 0, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }

.gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

.grid {
  display: grid;
  gap: var(--space-xl);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #000;
  font-weight: 900;
}

.nav-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--gold-gradient);
  color: #000 !important;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none !important;
}
.nav-cta:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-lg);
    gap: var(--space-md);
  }
  .nav-links.open { display: flex; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover {
  background: var(--gold-gradient-hover);
  box-shadow: var(--shadow-gold-lg);
  transform: translateY(-2px);
  color: #000;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-secondary:hover {
  background: var(--gold-glow);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
  color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Stat Cards --- */
.stat-card {
  text-align: center;
  padding: var(--space-xl);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-gold {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.badge-green {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

td { color: var(--text-primary); }

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg-card-hover); }

/* --- Disclaimer Banner --- */
.disclaimer {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--red);
}

.disclaimer-gold {
  background: var(--gold-glow);
  border-color: var(--border-gold);
}

.disclaimer-gold strong {
  color: var(--gold);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Utility --- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Gold shimmer effect */
.gold-shimmer {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s ease infinite;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Legal page specific --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding-top: calc(var(--nav-height) + var(--space-3xl));
}

.legal-content h1 {
  margin-bottom: var(--space-sm);
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-2xl);
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--gold);
}

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.legal-content ul, .legal-content ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--border-gold);
  text-underline-offset: 2px;
}
