/*
Theme Name:   Astra Child
Theme URI:    https://dynamidoxa.com
Description:  Professional trading indicators theme for DynamiDoxa - Institutional-grade NinjaTrader tools
Author:       Cédric - DynamiDoxa
Author URI:   https://dynamidoxa.com
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         trading, ninjatrader, indicators, order-flow, financial
*/

/* ═══════════════════════════════════════════════════════════════════════
   TABLE OF CONTENTS
   ═══════════════════════════════════════════════════════════════════════
   
   1. CSS VARIABLES - Design System Tokens
   2. GLOBAL RESETS - Base styles
   3. TYPOGRAPHY - Fonts & text styles
   4. LAYOUT - Grid & containers
   5. UTILITIES - Helper classes
   6. SKIP LINK - Accessibility
   7. BUTTONS - CTA & interactive elements
   8. RESPONSIVE - Media queries
   
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   1. CSS VARIABLES - DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand Colors */
  --dd-primary: #00D9FF;        /* Cyan primary */
  --dd-secondary: #00E5FF;      /* Cyan light */
  --dd-accent: #00B8D4;         /* Cyan dark */
  --dd-dark: #0A1628;           /* Navy dark */
  --dd-dark-light: #1A2845;     /* Navy light */
  
  /* Neutral Colors */
  --dd-white: #FFFFFF;
  --dd-gray-100: #F5F7FA;       /* Lightest gray */
  --dd-gray-200: #E1E8ED;
  --dd-gray-300: #CBD5E0;
  --dd-gray-400: #A0AEC0;
  --dd-gray-500: #718096;
  --dd-gray-600: #4A5568;
  --dd-gray-700: #2D3748;
  --dd-gray-800: #1A202C;       /* Darkest gray */
  
  /* Semantic Colors */
  --dd-success: #48BB78;        /* Green */
  --dd-warning: #F6AD55;        /* Orange */
  --dd-error: #F56565;          /* Red */
  --dd-info: #4299E1;           /* Blue */
  
  /* Spacing Scale (based on 4px/8px grid) */
  --dd-space-xs: 0.25rem;       /* 4px */
  --dd-space-sm: 0.5rem;        /* 8px */
  --dd-space-md: 1rem;          /* 16px */
  --dd-space-lg: 1.5rem;        /* 24px */
  --dd-space-xl: 2rem;          /* 32px */
  --dd-space-2xl: 3rem;         /* 48px */
  --dd-space-3xl: 4rem;         /* 64px */
  
  /* Typography */
  --dd-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dd-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dd-font-mono: 'Fira Code', 'Courier New', monospace;
  
  /* Font Sizes - Fluid Typography (responsive) */
  --dd-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --dd-text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --dd-text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --dd-text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --dd-text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --dd-text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --dd-text-3xl: clamp(2rem, 1.75rem + 1.25vw, 3rem);
  --dd-text-4xl: clamp(2.5rem, 2rem + 2.5vw, 3.5rem);
  
  /* Line Heights */
  --dd-leading-tight: 1.2;
  --dd-leading-normal: 1.5;
  --dd-leading-relaxed: 1.75;
  
  /* Border Radius */
  --dd-radius-sm: 4px;
  --dd-radius-md: 8px;
  --dd-radius-lg: 12px;
  --dd-radius-xl: 16px;
  --dd-radius-full: 9999px;
  
  /* Box Shadows */
  --dd-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --dd-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --dd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --dd-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --dd-shadow-glow: 0 0 20px rgba(0, 217, 255, 0.4);
  
  /* Transitions */
  --dd-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --dd-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --dd-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index Scale */
  --dd-z-base: 0;
  --dd-z-dropdown: 1000;
  --dd-z-sticky: 1100;
  --dd-z-fixed: 1200;
  --dd-z-modal: 1300;
  --dd-z-popover: 1400;
  --dd-z-tooltip: 1500;
}

/* ═══════════════════════════════════════════════════════════════════════
   2. GLOBAL RESETS & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

/* Disable smooth scroll for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--dd-font-body);
  font-size: var(--dd-text-base);
  line-height: var(--dd-leading-normal);
  color: var(--dd-gray-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--dd-font-heading);
  font-weight: 700;
  line-height: var(--dd-leading-tight);
  color: var(--dd-dark);
}

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

h2 {
  font-size: var(--dd-text-3xl);
}

h3 {
  font-size: var(--dd-text-2xl);
}

h4 {
  font-size: var(--dd-text-xl);
}

h5 {
  font-size: var(--dd-text-lg);
}

h6 {
  font-size: var(--dd-text-base);
}

p {
  margin-bottom: var(--dd-space-md);
  line-height: var(--dd-leading-relaxed);
}

a {
  color: var(--dd-primary);
  text-decoration: none;
  transition: color var(--dd-transition-fast);
}

a:hover {
  color: var(--dd-secondary);
}

strong {
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════
   4. LAYOUT - CONTAINERS & GRID
   ═══════════════════════════════════════════════════════════════════════ */

.dd-container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--dd-space-lg);
}

.dd-container--narrow {
  max-width: 800px;
}

.dd-container--wide {
  max-width: 1400px;
}

/* ═══════════════════════════════════════════════════════════════════════
   5. UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════ */

/* Screen Reader Only (Accessibility) */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Text Alignment */
.dd-text-center {
  text-align: center;
}

.dd-text-left {
  text-align: left;
}

.dd-text-right {
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════════════════
   6. SKIP LINK - ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  z-index: var(--dd-z-tooltip);
  padding: var(--dd-space-md) var(--dd-space-lg);
  background: var(--dd-dark);
  color: var(--dd-primary);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--dd-primary);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════
   7. BUTTONS - CTA & INTERACTIVE ELEMENTS
   ═══════════════════════════════════════════════════════════════════════ */

.dd-btn {
  display: inline-block;
  padding: var(--dd-space-md) var(--dd-space-xl);
  font-size: var(--dd-text-base);
  font-weight: 600;
  font-family: var(--dd-font-body);
  text-decoration: none;
  text-align: center;
  border-radius: var(--dd-radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--dd-transition-base);
  white-space: nowrap;
}

/* Primary Button */
.dd-btn--primary {
  background: var(--dd-primary);
  color: var(--dd-dark);
  box-shadow: var(--dd-shadow-glow);
}

.dd-btn--primary:hover,
.dd-btn--primary:focus-visible {
  background: var(--dd-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 217, 255, 0.6);
}

/* Secondary Button */
.dd-btn--secondary {
  background: transparent;
  color: var(--dd-dark);
  border: 2px solid var(--dd-primary);
}

.dd-btn--secondary:hover,
.dd-btn--secondary:focus-visible {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--dd-secondary);
}

/* Button Focus States (Accessibility) */
.dd-btn:focus-visible {
  outline: 3px solid rgba(0, 217, 255, 0.6);
  outline-offset: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   8. RESPONSIVE - MOBILE FIRST
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 968px) {
  .dd-container {
    padding-inline: var(--dd-space-md);
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 14px; /* Reduce base font size on mobile */
  }
  
  .dd-container {
    padding-inline: var(--dd-space-sm);
  }
  
  .dd-btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   9. PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════ */

@media print {
  body {
    color: black;
    background: white;
  }
  
  a {
    text-decoration: underline;
  }
  
  .dd-btn,
  .skip-link {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   END OF FILE
   ═══════════════════════════════════════════════════════════════════════ */