/*
Theme Name: QDEX
Theme URI: https://qdexai.com
Author: QDEX AI Ltd
Author URI: https://qdexai.com
Description: Official QDEX landing page theme. Clean, lightweight, Gutenberg-compatible. Editable via Theme Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://qdexai.com/terms
Text Domain: qdex
Tags: one-column, custom-logo, custom-colors, editor-style, featured-images

QDEX - Credit Made Simple
UK Mortgage Broker Platform
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens from qdexTheme.ts)
   ========================================================================== */

:root {
  /* Primary Purple Palette */
  --qdex-primary-0: #F3F0FF;
  --qdex-primary-1: #E5DBFF;
  --qdex-primary-2: #D0BFFF;
  --qdex-primary-3: #B197FC;
  --qdex-primary-4: #9775FA;
  --qdex-primary-5: #845EF7;
  --qdex-primary-6: #7950F2; /* Main brand color */
  --qdex-primary-7: #7048E8;
  --qdex-primary-8: #6741D9; /* Hover state */
  --qdex-primary-9: #5F3DC4;

  /* Gray Palette */
  --qdex-gray-0: #f8f9fa;
  --qdex-gray-1: #f1f3f5;
  --qdex-gray-2: #e9ecef;
  --qdex-gray-3: #dee2e6;
  --qdex-gray-4: #ced4da;
  --qdex-gray-5: #adb5bd;
  --qdex-gray-6: #868e96;
  --qdex-gray-7: #495057;
  --qdex-gray-8: #343a40;
  --qdex-gray-9: #212529;

  /* Dark Palette */
  --qdex-dark-0: #C1C2C5;
  --qdex-dark-1: #A6A7AB;
  --qdex-dark-2: #909296;
  --qdex-dark-3: #5c5f66;
  --qdex-dark-4: #373A40;
  --qdex-dark-5: #2C2E33;
  --qdex-dark-6: #25262b;
  --qdex-dark-7: #1A1B1E;
  --qdex-dark-8: #141517;
  --qdex-dark-9: #101113;

  /* Semantic Colors */
  --qdex-success: #12B886;
  --qdex-error: #FA5252;
  --qdex-warning: #e07c00;

  /* Typography */
  --qdex-font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --qdex-radius-xs: 2px;
  --qdex-radius-sm: 4px;
  --qdex-radius-md: 8px;
  --qdex-radius-lg: 16px;
  --qdex-radius-xl: 32px;

  /* Theme colors (light mode defaults) */
  --background: #ffffff;
  --background-rgb: 255, 255, 255;
  --foreground: var(--qdex-gray-9);
  --card: var(--qdex-gray-0);
  --card-foreground: var(--qdex-gray-9);
  --muted-foreground: var(--qdex-gray-6);
  --border: var(--qdex-gray-3);
}

/* Dark mode - applied via class on html/body */
/* Colors matched to original Tailwind/shadcn dark theme */
.dark,
[data-theme="dark"] {
  /* Deep navy background - matches hsl(222.2 84% 4.9%) */
  --background: #020817;
  --background-rgb: 2, 8, 23;

  /* Foreground - matches hsl(210 40% 98%) */
  --foreground: #f8fafc;

  /* Card - glassmorphism with transparency and blur */
  --card: rgba(255, 255, 255, 0.03);
  --card-foreground: #f8fafc;

  /* Muted foreground - matches hsl(215 20.2% 65.1%) */
  --muted-foreground: #94a3b8;

  /* Border - matches hsl(217.2 32.6% 17.5%) */
  --border: #1e293b;

  /* Muted background (for sections) */
  --muted: #1e293b;

  /* Accent (same as muted for dark) */
  --accent: #1e293b;
  --accent-foreground: #f8fafc;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

/* WordPress admin bar fix */
body.admin-bar .qdex-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .qdex-header {
    top: 46px;
  }
}
