/* ============================================
   GoldXChange - Main Stylesheet
   Dark Luxury Theme with Gold Accents
   ============================================ */

/* --- CSS Variables --- */
:root {
  --background: hsl(0, 0%, 4%);
  --foreground: hsl(45, 30%, 96%);
  --card: hsl(0, 0%, 7%);
  --card-foreground: hsl(45, 30%, 96%);
  --popover: hsl(0, 0%, 7%);
  --popover-foreground: hsl(45, 30%, 96%);
  --primary: hsl(43, 74%, 52%);
  --primary-foreground: hsl(0, 0%, 4%);
  --gold: hsl(43, 74%, 52%);
  --gold-light: hsl(45, 86%, 68%);
  --gold-dark: hsl(38, 65%, 38%);
  --gold-muted: hsl(40, 30%, 25%);
  --secondary: hsl(0, 0%, 10%);
  --secondary-foreground: hsl(45, 30%, 96%);
  --muted: hsl(0, 0%, 12%);
  --muted-foreground: hsl(40, 10%, 65%);
  --accent: hsl(43, 74%, 52%);
  --accent-foreground: hsl(0, 0%, 4%);
  --destructive: hsl(0, 70%, 50%);
  --destructive-foreground: hsl(0, 0%, 98%);
  --border: hsl(0, 0%, 14%);
  --input: hsl(0, 0%, 12%);
  --ring: hsl(43, 74%, 52%);
  --radius: 0.25rem;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --gradient-gold: linear-gradient(135deg, hsl(45, 86%, 68%) 0%, hsl(43, 74%, 52%) 50%, hsl(38, 65%, 38%) 100%);
  --gradient-gold-shine: linear-gradient(110deg, hsl(38, 65%, 38%) 0%, hsl(45, 86%, 68%) 45%, hsl(43, 74%, 52%) 55%, hsl(38, 65%, 38%) 100%);
  --gradient-dark: linear-gradient(180deg, hsl(0, 0%, 4%) 0%, hsl(0, 0%, 7%) 100%);
  --gradient-radial-gold: radial-gradient(ellipse at center, hsl(43, 74%, 52% / 0.15) 0%, transparent 70%);
  --shadow-gold: 0 10px 40px -10px hsl(43, 74%, 52% / 0.4);
  --shadow-gold-sm: 0 4px 20px -4px hsl(43, 74%, 52% / 0.25);
  --shadow-elegant: 0 20px 60px -20px hsl(0, 0%, 0% / 0.8);

  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Text Colors --- */
.text-gold { color: var(--gold); }

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  color: var(--gold);
  font-size: 0.75rem;
}

.logo-text {
  color: var(--foreground);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: width 0.3s var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--foreground);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s var(--transition-smooth);
}

.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(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  white-space: nowrap;
  font-family: var(--font-body);
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--primary-foreground);
  border-color: transparent;
}

.btn-gold:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* --- Section Styles --- */
.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

.section-description {
  font-size: 1.05rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 70% 50%, hsl(43, 74%, 52% / 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 80%, hsl(43, 74%, 52% / 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero-bg-glow {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, hsl(43, 74%, 52% / 0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.badge-icon {
  color: var(--gold);
}

/* Hero Card */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-elegant);
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-card-body {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-label {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.price-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.hero-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.update-time {
  font-family: monospace;
  color: var(--gold);
}

/* --- Live Rates Section --- */
.rates-section {
  border-top: 1px solid var(--border);
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.rate-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--transition-smooth);
}

.rate-card:hover {
  border-color: var(--gold) / 0.4;
  box-shadow: var(--shadow-gold-sm);
  transform: translateY(-2px);
}

.rate-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.rate-metal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.metal-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.gold-icon { color: var(--gold); }
.silver-icon { color: #c0c0c0; }
.plat-icon { color: #e5e4e2; }
.pall-icon { color: #b5a99a; }

.metal-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.rate-change {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.rate-change.positive {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.rate-change.negative {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.rate-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.rate-item:last-child {
  border-bottom: none;
}

.rate-label {
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.rate-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

/* --- How It Works Section --- */
.how-section {
  border-top: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 3rem;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-muted), transparent);
}

.step-card {
  text-align: center;
  padding: 2rem;
  position: relative;
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-muted);
  line-height: 1;
  margin-bottom: 1rem;
}

.step-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: var(--gold-muted) / 0.2;
  border-radius: 50%;
  color: var(--gold);
}

.step-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step-description {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* --- About Section --- */
.about-section {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content .section-subtitle,
.about-content .section-title,
.about-content .section-description {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.feature-check {
  color: var(--gold);
  font-weight: 700;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

/* --- Testimonials Section --- */
.testimonials-section {
  border-top: 1px solid var(--border);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.author-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.author-location {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* --- Contact Section --- */
.contact-section {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-muted) / 0.2;
  border-radius: 12px;
  color: var(--gold);
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.contact-value {
  display: block;
  font-size: 0.95rem;
  color: var(--foreground);
  line-height: 1.5;
}

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

/* Contact Form */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--muted);
  border: 1px solid var(--input);
  border-radius: 8px;
  color: var(--foreground);
  transition: border-color 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px hsl(43, 74%, 52% / 0.15);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

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

.footer-description {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-top: 1rem;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a,
.footer-links span {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s var(--transition-smooth) forwards;
}

/* --- Responsive Design --- */

/* Tablet */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }

  .rates-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }

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

/* Mobile */
@media (max-width: 768px) {
  .navbar { background: rgba(10, 10, 10, 0.95); }
  
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    display: none;
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .hero-visual {
    order: -1;
  }

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

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

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

  .steps-grid::before {
    display: none;
  }

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

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

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

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

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

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

  .hero-badges {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

  .btn-lg {
    padding: 0.75rem 1.5rem;
  }
}

/* --- Success Message --- */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show {
  display: block;
  animation: fadeIn 0.4s ease;
}

.form-success-icon {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 1rem;
}

.form-success-text {
  font-size: 1.1rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.form-success-sub {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
