/* ============================================================
   M'CUBE PAY — COMPLETE REINVENTION
   Based on MCubePay_Reinvention_Prompt.pdf v1.0
   Design System: Navy + Gold + Teal
   Typography: Clash Display + Plus Jakarta Sans + DM Mono
   ============================================================ */

/* ── 1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) ──────────────── */
:root {
  /* Brand Colors - Section 2.1 */
  --mcube-navy: #0A1628;
  --mcube-gold: #F5B800;
  --mcube-teal: #00C9A7;
  --mcube-surface: #F7F5F0;
  --mcube-near-black: #1A1A2E;
  --mcube-mid-grey: #6B7280;
  --mcube-light-grey: #E5E7EB;
  --mcube-dark-bg: #0D0D0D;
  --mcube-error: #DC2626;
  --mcube-success: #059669;

  /* Typography - Section 2.2 */
  --mcube-font-display: 'Clash Display', -apple-system, BlinkMacSystemFont, sans-serif;
  --mcube-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mcube-font-mono: 'DM Mono', 'Courier New', monospace;

  /* Typography Scale - Section 2.4 */
  --mcube-fs-display: 64px;
  --mcube-fs-h1: 48px;
  --mcube-fs-h2: 32px;
  --mcube-fs-h3: 24px;
  --mcube-fs-body: 16px;
  --mcube-fs-caption: 14px;
  --mcube-fs-label: 12px;

  /* Spacing - Section 2.4 */
  --mcube-space-card: 20px;
  --mcube-space-section: 24px;
  --mcube-space-page-mobile: 16px;
  --mcube-space-page-desktop: 80px;

  /* Touch Targets - Section 2.4 */
  --mcube-touch-min: 48px;

  /* Transitions */
  --mcube-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --mcube-duration: 0.3s;

  /* Shadows */
  --mcube-shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.08);
  --mcube-shadow-md: 0 4px 16px rgba(10, 22, 40, 0.12);
  --mcube-shadow-lg: 0 8px 32px rgba(10, 22, 40, 0.16);
  --mcube-shadow-gold: 0 4px 20px rgba(245, 184, 0, 0.35);

  /* Radius */
  --mcube-radius-sm: 8px;
  --mcube-radius-md: 12px;
  --mcube-radius-lg: 16px;
  --mcube-radius-full: 9999px;
}

/* Dark Mode Override */
[data-theme="dark"] {
  --mcube-surface: var(--mcube-dark-bg);
  --mcube-near-black: #E6EDF3;
  --mcube-mid-grey: #9BAAB8;
  --mcube-light-grey: #2D3748;
}

/* ── 2. RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--mcube-font-body);
  font-size: var(--mcube-fs-body);
  line-height: 1.6;
  color: var(--mcube-near-black);
  background: var(--mcube-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 3. TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mcube-font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--mcube-near-black);
}

h1 { font-size: var(--mcube-fs-h1); }
h2 { font-size: var(--mcube-fs-h2); }
h3 { font-size: var(--mcube-fs-h3); }

.display-text {
  font-family: var(--mcube-font-display);
  font-size: var(--mcube-fs-display);
  font-weight: 700;
  line-height: 1.1;
}

.mono-text {
  font-family: var(--mcube-font-mono);
  font-weight: 500;
}

/* ── 4. NAVIGATION (Section 3.1) ───────────────────────────── */
.mcube-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: all var(--mcube-duration) var(--mcube-ease);
}

.mcube-nav.scrolled {
  background: var(--mcube-navy);
  backdrop-filter: blur(20px);
  box-shadow: var(--mcube-shadow-sm);
}

.mcube-nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--mcube-space-page-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.mcube-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mcube-logo {
  font-family: var(--mcube-font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.mcube-fca-badge {
  background: var(--mcube-gold);
  color: var(--mcube-navy);
  padding: 4px 12px;
  border-radius: var(--mcube-radius-full);
  font-size: var(--mcube-fs-label);
  font-weight: 600;
  font-family: var(--mcube-font-body);
}

.mcube-nav-center {
  display: none;
  gap: 32px;
}

.mcube-nav-center a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: var(--mcube-fs-body);
  font-weight: 500;
  transition: color var(--mcube-duration) var(--mcube-ease);
}

.mcube-nav-center a:hover {
  color: var(--mcube-gold);
}

.mcube-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mcube-rate-ticker {
  font-family: var(--mcube-font-mono);
  font-size: var(--mcube-fs-caption);
  color: var(--mcube-gold);
  padding: 6px 12px;
  background: rgba(245, 184, 0, 0.1);
  border-radius: var(--mcube-radius-sm);
  display: none;
}

.mcube-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--mcube-radius-full);
  font-size: var(--mcube-fs-caption);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--mcube-duration) var(--mcube-ease);
  text-decoration: none;
  display: inline-block;
}

.mcube-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.mcube-btn-gold {
  background: var(--mcube-gold);
  color: var(--mcube-navy);
  padding: 12px 24px;
  border-radius: var(--mcube-radius-full);
  font-size: var(--mcube-fs-body);
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--mcube-duration) var(--mcube-ease);
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--mcube-shadow-gold);
}

.mcube-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 184, 0, 0.45);
}

/* Desktop Navigation */
@media (min-width: 1024px) {
  .mcube-nav-container {
    padding: 0 var(--mcube-space-page-desktop);
  }
  
  .mcube-nav-center {
    display: flex;
  }
  
  .mcube-rate-ticker {
    display: block;
  }
}

/* ── 5. HERO SECTION (Section 3.2) ─────────────────────────── */
.mcube-hero {
  background: linear-gradient(135deg, var(--mcube-navy) 0%, #0D1F35 50%, #0A1628 100%);
  padding: 120px var(--mcube-space-page-mobile) 80px;
  position: relative;
  overflow: hidden;
  min-height: 600px;
}

.mcube-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(245, 184, 0, 0.05);
  pointer-events: none;
}

.mcube-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0, 201, 167, 0.05);
  pointer-events: none;
}

.mcube-hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  position: relative;
  z-index: 2;
}

.mcube-hero-content h1 {
  font-family: var(--mcube-font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.mcube-hero-content p {
  font-size: var(--mcube-fs-h3);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 540px;
}

.mcube-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.mcube-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--mcube-fs-caption);
  font-weight: 500;
}

.mcube-trust-item i {
  color: var(--mcube-teal);
  font-size: 18px;
}

/* Desktop Hero Layout */
@media (min-width: 1024px) {
  .mcube-hero {
    padding: 140px var(--mcube-space-page-desktop) 100px;
  }
  
  .mcube-hero-container {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }
}

/* ── 6. CALCULATOR CARD ────────────────────────────────────── */
.mcube-calculator {
  background: #fff;
  border-radius: var(--mcube-radius-lg);
  padding: var(--mcube-space-card);
  box-shadow: var(--mcube-shadow-lg);
}

.mcube-calculator-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mcube-light-grey);
}

.mcube-calculator-header h3 {
  font-size: var(--mcube-fs-h3);
  color: var(--mcube-navy);
  margin-bottom: 8px;
}

.mcube-calculator-rate {
  font-family: var(--mcube-font-mono);
  font-size: var(--mcube-fs-h2);
  color: var(--mcube-gold);
  font-weight: 700;
}

.mcube-input-group {
  margin-bottom: 20px;
}

.mcube-input-group label {
  display: block;
  font-size: var(--mcube-fs-caption);
  font-weight: 600;
  color: var(--mcube-mid-grey);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mcube-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid var(--mcube-light-grey);
  border-radius: var(--mcube-radius-md);
  overflow: hidden;
  transition: border-color var(--mcube-duration) var(--mcube-ease);
}

.mcube-input-wrapper:focus-within {
  border-color: var(--mcube-navy);
}

.mcube-input-wrapper input {
  flex: 1;
  border: none;
  padding: 16px;
  font-family: var(--mcube-font-mono);
  font-size: var(--mcube-fs-h3);
  font-weight: 600;
  color: var(--mcube-near-black);
  outline: none;
}

.mcube-currency-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--mcube-surface);
  border: none;
  border-left: 2px solid var(--mcube-light-grey);
  cursor: pointer;
  transition: background var(--mcube-duration) var(--mcube-ease);
}

.mcube-currency-btn:hover {
  background: rgba(10, 22, 40, 0.05);
}

.mcube-currency-btn img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.mcube-currency-code {
  font-family: var(--mcube-font-mono);
  font-weight: 700;
  font-size: var(--mcube-fs-caption);
  color: var(--mcube-near-black);
}

.mcube-fee-strip {
  background: rgba(10, 22, 40, 0.03);
  padding: 12px 16px;
  border-radius: var(--mcube-radius-sm);
  margin: 16px 0;
}

.mcube-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: var(--mcube-fs-caption);
}

.mcube-fee-label {
  color: var(--mcube-mid-grey);
  font-weight: 500;
}

.mcube-fee-value {
  font-family: var(--mcube-font-mono);
  font-weight: 600;
  color: var(--mcube-near-black);
}

.mcube-fee-row.total {
  border-top: 1px dashed var(--mcube-light-grey);
  padding-top: 12px;
  margin-top: 8px;
  font-weight: 700;
}

.mcube-fee-row.total .mcube-fee-value {
  color: var(--mcube-teal);
  font-size: var(--mcube-fs-body);
}

/* ── 7. BUTTONS ────────────────────────────────────────────── */
.mcube-btn {
  font-family: var(--mcube-font-body);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--mcube-duration) var(--mcube-ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--mcube-touch-min);
}

.mcube-btn-primary {
  background: var(--mcube-gold);
  color: var(--mcube-navy);
  padding: 16px 32px;
  border-radius: var(--mcube-radius-full);
  font-size: var(--mcube-fs-body);
  box-shadow: var(--mcube-shadow-gold);
}

.mcube-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 184, 0, 0.45);
}

.mcube-btn-full {
  width: 100%;
}

/* ── 8. UTILITY CLASSES ────────────────────────────────────── */
.text-center { text-align: center; }
.text-navy { color: var(--mcube-navy); }
.text-gold { color: var(--mcube-gold); }
.text-teal { color: var(--mcube-teal); }
.text-white { color: #fff; }
.text-grey { color: var(--mcube-mid-grey); }

.bg-navy { background: var(--mcube-navy); }
.bg-gold { background: var(--mcube-gold); }
.bg-teal { background: var(--mcube-teal); }
.bg-surface { background: var(--mcube-surface); }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* ── 9. RESPONSIVE UTILITIES ───────────────────────────────── */
.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
  
  .hide-desktop {
    display: none;
  }
}

/* ── 10. ANIMATIONS ────────────────────────────────────────── */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-count-up {
  animation: countUp 0.6s var(--mcube-ease);
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ── 11. LOADING STATES (Shimmer Skeleton) ────────────────── */
.mcube-skeleton {
  background: linear-gradient(
    90deg,
    var(--mcube-light-grey) 0%,
    rgba(229, 231, 235, 0.5) 50%,
    var(--mcube-light-grey) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--mcube-radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.mcube-skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.mcube-skeleton-heading {
  height: 32px;
  margin-bottom: 16px;
  width: 60%;
}

.mcube-skeleton-card {
  height: 200px;
  width: 100%;
}
