/* ==========================================================================
   AURUM EAST AFRICA — BASE DESIGN SYSTEM & TOKENS
   Calm Luxury Fintech Architecture
   ========================================================================== */

/* --------------------------------------------------------------------------
   Google Fonts Import
   Display Serif: Cormorant Garamond & Playfair Display
   Body Sans: Inter & Manrope
   Tabular Numerals for Financial Data
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  /* Color Palette — Luxury Fintech Dark (Default) */
  --color-bg-base: #0B0D10;
  --color-bg-surface: #14171C;
  --color-bg-surface-elevated: #1B2027;
  --color-bg-surface-subtle: #101317;
  --color-bg-glass: rgba(20, 23, 28, 0.78);
  --color-bg-glass-heavy: rgba(11, 13, 16, 0.88);

  /* Warm Ivory Typography */
  --color-text-primary: #F5F1E8;
  --color-text-secondary: #C8C3B6;
  --color-text-muted: #A8A396;
  --color-text-subtle: #736E62;
  --color-text-inverse: #0B0D10;

  /* Refined Champagne Gold Metallics */
  --color-gold-light: #E3C77A;
  --color-gold-primary: #C9A24B;
  --color-gold-deep: #8F6E24;
  --color-gold-dark: #634C17;
  --color-gold-subtle: rgba(201, 162, 75, 0.12);
  --color-gold-border: rgba(201, 162, 75, 0.28);
  --color-gold-border-bright: rgba(227, 199, 122, 0.55);

  /* Metallic Gradients */
  --grad-gold-metallic: linear-gradient(135deg, #F0DBA5 0%, #C9A24B 45%, #8F6E24 100%);
  --grad-gold-surface: linear-gradient(180deg, rgba(201, 162, 75, 0.08) 0%, rgba(20, 23, 28, 0) 100%);
  --grad-surface-card: linear-gradient(180deg, rgba(27, 32, 39, 0.85) 0%, rgba(16, 19, 23, 0.95) 100%);
  --grad-dark-radial: radial-gradient(circle at 50% 0%, rgba(201, 162, 75, 0.12) 0%, rgba(11, 13, 16, 0) 70%);

  /* Semantic Tones (WCAG AA Contrast Compliant) */
  --color-success: #22C55E;
  --color-success-bg: rgba(34, 197, 94, 0.12);
  --color-warning: #F59E0B;
  --color-warning-bg: rgba(245, 158, 11, 0.12);
  --color-error: #EF4444;
  --color-error-bg: rgba(239, 68, 68, 0.14);
  --color-info: #38BDF8;
  --color-info-bg: rgba(56, 189, 248, 0.12);

  /* Typography Scales */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Font Sizes (Fluid Clamps) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.625rem, 1.45rem + 0.9vw, 2.125rem);
  --text-3xl: clamp(2rem, 1.7rem + 1.5vw, 2.875rem);
  --text-4xl: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);
  --text-hero: clamp(2.75rem, 2.2rem + 3.2vw, 4.5rem);

  /* Line Heights */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Spacing Grid (8px baseline) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 9999px;

  /* Layered Shadows */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--color-gold-border);
  --shadow-card-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.75), 0 0 20px rgba(201, 162, 75, 0.18), 0 0 0 1px var(--color-gold-border-bright);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--color-gold-border);
  --shadow-gold-glow: 0 0 25px rgba(201, 162, 75, 0.25);

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --trans-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-Index Hierarchy */
  --z-base: 1;
  --z-card: 5;
  --z-sticky: 100;
  --z-header: 500;
  --z-drawer: 800;
  --z-modal: 1000;
  --z-toast: 1200;
  --z-preloader: 2000;
}

/* --------------------------------------------------------------------------
   Light Theme Override (Warm Ivory Luxury)
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --color-bg-base: #F8F5EE;
  --color-bg-surface: #FFFFFF;
  --color-bg-surface-elevated: #F1ECE0;
  --color-bg-surface-subtle: #EBE5D6;
  --color-bg-glass: rgba(255, 255, 255, 0.88);
  --color-bg-glass-heavy: rgba(248, 245, 238, 0.94);

  --color-text-primary: #181C22;
  --color-text-secondary: #3D4450;
  --color-text-muted: #6B7280;
  --color-text-subtle: #9CA3AF;
  --color-text-inverse: #FFFFFF;

  --color-gold-light: #B88A2D;
  --color-gold-primary: #996D19;
  --color-gold-deep: #75520E;
  --color-gold-dark: #4F3607;
  --color-gold-subtle: rgba(153, 109, 25, 0.08);
  --color-gold-border: rgba(153, 109, 25, 0.22);
  --color-gold-border-bright: rgba(153, 109, 25, 0.45);

  --grad-gold-metallic: linear-gradient(135deg, #DEB86A 0%, #A67C26 50%, #765416 100%);
  --grad-gold-surface: linear-gradient(180deg, rgba(153, 109, 25, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
  --grad-surface-card: linear-gradient(180deg, #FFFFFF 0%, #FBF9F4 100%);
  --grad-dark-radial: radial-gradient(circle at 50% 0%, rgba(153, 109, 25, 0.08) 0%, rgba(248, 245, 238, 0) 70%);

  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 25px -10px rgba(70, 50, 10, 0.08), 0 0 0 1px var(--color-gold-border);
  --shadow-card-hover: 0 16px 35px -10px rgba(70, 50, 10, 0.15), 0 0 0 1px var(--color-gold-border-bright);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--trans-normal), color var(--trans-normal);
}

/* Tabular Numbers for Prices & Quantities */
.tabular-nums, .price-val, .ticker-val, td.numeric, .stat-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* --------------------------------------------------------------------------
   Typography Baseline
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--text-xl);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}

p.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  font-weight: 400;
}

a {
  color: var(--color-gold-light);
  text-decoration: none;
  transition: color var(--trans-fast);
}

a[href^="mailto:"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

strong, b {
  font-weight: 700;
  color: var(--color-text-primary);
}

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-border), transparent);
  margin: var(--space-10) 0;
}

/* --------------------------------------------------------------------------
   Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-4);
  background: var(--color-gold-primary);
  color: #0B0D10;
  padding: var(--space-3) var(--space-6);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--trans-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid #FFFFFF;
}

:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 3px;
}

@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;
  }
  .luxury-preloader {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Containers & Spacing Utility
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

@media (min-width: 1280px) {
  .container {
    padding-inline: var(--space-10);
  }
}

.section {
  padding-block: var(--space-16);
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-24);
  }
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section-header .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin-bottom: var(--space-3);
}

.section-header .section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.section-header .section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}
