:root {
  --primary-gold: #D4AF37;
  --primary-gold-dark: #B8860B;
  --accent-blue: #4A90E2;
  --bg-dark: #0A0A0A;
  --bg-darker: #050505;
  --bg-card: #141414;
  --text: #F5F5F5;
  --text-dim: #A8A8A8;
  --border: #2A2A2A;
  --success: #10B981;
  --error: #EF4444;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.7);
  --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  --gradient-dark: linear-gradient(135deg, #141414 0%, #0A0A0A 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  background: var(--bg-dark);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation - Enhanced */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  padding: 20px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
  padding: 15px 0;
  background: rgba(10, 10, 10, 0.98);
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 1.6rem;
}

.brand-accent {
  color: var(--primary-gold);
  margin-left: 4px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--primary-gold);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover {
  color: var(--primary-gold);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-cta-primary {
  background: var(--gradient-gold);
  color: var(--bg-dark) !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.nav-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Hero Section - Enhanced */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
          radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
          radial-gradient(circle at 80% 50%, rgba(74, 144, 226, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.subtitle {
  display: block;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 16px;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease-out 0.1s backwards;
}

.lead {
  max-width: 720px;
  margin: 0 auto 40px;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 8px;
  background: var(--gradient-gold);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
  animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

/* Parallax layers */
.parallax {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.parallax .layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out;
}

.layer.l1 {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent 70%);
}

.layer.l2 {
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle, rgba(74, 144, 226, 0.2), transparent 70%);
  animation-delay: -5s;
}

.layer.l3 {
  width: 300px;
  height: 300px;
  top: 30%;
  right: 10%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent 70%);
  animation-delay: -10s;
}

/* Section divider */
.section-divider {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-divider::before {
  content: "";
  position: absolute;
  width: min(90%, 1200px);
  height: 1px;
  background: linear-gradient(90deg,
  transparent,
  rgba(212, 175, 55, 0.2),
  rgba(212, 175, 55, 0.5),
  rgba(212, 175, 55, 0.2),
  transparent);
}

/* Sections */
.section {
  padding: 100px 0;
  background: var(--bg-dark);
  position: relative;
}

.section.alt {
  background: linear-gradient(135deg, #0F0F0F 0%, #141414 100%);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.1rem;
}

/* Grid and Cards */
.grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: translateX(0);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(212, 175, 55, 0.3);
}

.card .icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: pulse 2s infinite;
}

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--primary-gold);
}

.card p {
  color: var(--text-dim);
  line-height: 1.7;
}

/* Forms - Much better styling */
.section-dark {
  min-height: 100vh;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
  display: flex;
  align-items: center;
}

.content-card {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 48px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.content-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.content-card input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.content-card input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.content-card button {
  width: 100%;
  padding: 16px;
  background: var(--gradient-gold);
  color: var(--bg-dark);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.content-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

/* Footer - Enhanced */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  font-weight: 800;
}

.footer-section h4 span {
  color: var(--primary-gold);
}

.footer-section h5 {
  color: var(--primary-gold);
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-gold);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(1deg);
  }
  66% {
    transform: translateY(30px) rotate(-1deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(85%, 380px);
    height: 100vh;
    background: var(--bg-darker);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: 32px 24px;
  }
}
/* Additional enhancements */

/* Loading states */
.loading {
  position: relative;
  color: transparent !important;
}

.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid var(--primary-gold);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Input validation states */
input.valid {
  border-color: var(--success) !important;
}

input.error {
  border-color: var(--error) !important;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--bg-card);
  color: var(--text);
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--gradient-gold);
  color: var(--bg-dark);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Notification banner */
.notification {
  position: fixed;
  top: 80px;
  right: 20px;
  min-width: 300px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transform: translateX(400px);
  transition: transform 0.3s ease;
  z-index: 1001;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

/* Improved mobile responsiveness */
@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .lead {
    font-size: 1rem;
  }

  .cta-btn {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .card {
    padding: 24px;
  }

  .footer-content {
    gap: 32px;
  }

  .content-card {
    margin: 0 16px;
  }

  .content-card > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* Print styles */
@media print {
  .navbar, .footer, .cta-btn, .nav-toggle {
    display: none;
  }

  body {
    color: black;
    background: white;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-gold);
  outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode is already the default, but this ensures consistency */
@media (prefers-color-scheme: light) {
  /* Users who prefer light mode still get dark theme for this trading platform */
  /* Trading platforms typically use dark themes */
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-gold);
}

/* Page transitions */
body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}