/* ============================================
   WORK4ONEDOLLAR DESIGN SYSTEM v2.0
   Main Entry Point - MNC Standard Edition
   ============================================ */

/* Import MNC 4-Color System (Primary source) */
@import '_colors-mnc.css';

/* Import MNC Components (New standard) */
@import '_components-mnc.css';

/* Import Design Tokens (Legacy - for backward compatibility) */
@import '_variables.css';

/* Import Components (Legacy) */
@import '_components.css';

/* Import Animations */
@import '_animations.css';

/* Import Responsive System */
@import '_responsive.css';

/* ============================================
   BASE RESET & DEFAULTS
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY DEFAULTS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
}

h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
}

h3 {
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
}

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

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

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

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

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--text-link-hover);
}

strong, b {
  font-weight: var(--font-semibold);
}

small {
  font-size: var(--text-sm);
}

/* ============================================
   SELECTION STYLING
   ============================================ */

::selection {
  background: var(--color-primary);
  color: white;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-secondary);
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */

:focus {
  outline: none;
}

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

/* Skip Link */
.w4-skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: white;
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  z-index: var(--z-max);
  transition: top var(--transition-base);
}

.w4-skip-link:focus {
  top: var(--space-4);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Colors */
.w4-text-primary { color: var(--text-primary); }
.w4-text-secondary { color: var(--text-secondary); }
.w4-text-tertiary { color: var(--text-tertiary); }
.w4-text-success { color: var(--color-success); }
.w4-text-warning { color: var(--color-warning); }
.w4-text-error { color: var(--color-error); }
.w4-text-info { color: var(--color-info); }
.w4-text-brand { color: var(--color-primary); }
.w4-text-accent { color: var(--color-accent); }

/* Background Colors */
.w4-bg-body { background: var(--bg-body); }
.w4-bg-primary { background: var(--bg-primary); }
.w4-bg-secondary { background: var(--bg-secondary); }
.w4-bg-tertiary { background: var(--bg-tertiary); }
.w4-bg-elevated { background: var(--bg-elevated); }

/* Gradient Text */
.w4-gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Borders */
.w4-border { border: 1px solid var(--border-default); }
.w4-border-t { border-top: 1px solid var(--border-default); }
.w4-border-b { border-bottom: 1px solid var(--border-default); }
.w4-border-l { border-left: 1px solid var(--border-default); }
.w4-border-r { border-right: 1px solid var(--border-default); }

/* Border Radius */
.w4-rounded-none { border-radius: 0; }
.w4-rounded-sm { border-radius: var(--radius-sm); }
.w4-rounded { border-radius: var(--radius-md); }
.w4-rounded-lg { border-radius: var(--radius-lg); }
.w4-rounded-xl { border-radius: var(--radius-xl); }
.w4-rounded-2xl { border-radius: var(--radius-2xl); }
.w4-rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.w4-shadow-none { box-shadow: none; }
.w4-shadow-sm { box-shadow: var(--shadow-sm); }
.w4-shadow { box-shadow: var(--shadow-md); }
.w4-shadow-lg { box-shadow: var(--shadow-lg); }
.w4-shadow-xl { box-shadow: var(--shadow-xl); }

/* Spacing */
.w4-m-0 { margin: 0; }
.w4-m-auto { margin: auto; }
.w4-mx-auto { margin-left: auto; margin-right: auto; }
.w4-my-4 { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.w4-my-6 { margin-top: var(--space-6); margin-bottom: var(--space-6); }
.w4-my-8 { margin-top: var(--space-8); margin-bottom: var(--space-8); }

.w4-mt-2 { margin-top: var(--space-2); }
.w4-mt-4 { margin-top: var(--space-4); }
.w4-mt-6 { margin-top: var(--space-6); }
.w4-mt-8 { margin-top: var(--space-8); }

.w4-mb-2 { margin-bottom: var(--space-2); }
.w4-mb-4 { margin-bottom: var(--space-4); }
.w4-mb-6 { margin-bottom: var(--space-6); }
.w4-mb-8 { margin-bottom: var(--space-8); }

.w4-p-0 { padding: 0; }
.w4-p-2 { padding: var(--space-2); }
.w4-p-4 { padding: var(--space-4); }
.w4-p-6 { padding: var(--space-6); }
.w4-p-8 { padding: var(--space-8); }

.w4-px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.w4-py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.w4-px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.w4-py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

/* Width & Height */
.w4-w-full { width: 100%; }
.w4-h-full { height: 100%; }
.w4-min-h-screen { min-height: 100vh; }

/* Text Utilities */
.w4-text-left { text-align: left; }
.w4-text-center { text-align: center; }
.w4-text-right { text-align: right; }

.w4-font-normal { font-weight: var(--font-normal); }
.w4-font-medium { font-weight: var(--font-medium); }
.w4-font-semibold { font-weight: var(--font-semibold); }
.w4-font-bold { font-weight: var(--font-bold); }

.w4-text-xs { font-size: var(--text-xs); }
.w4-text-sm { font-size: var(--text-sm); }
.w4-text-base { font-size: var(--text-base); }
.w4-text-lg { font-size: var(--text-lg); }
.w4-text-xl { font-size: var(--text-xl); }
.w4-text-2xl { font-size: var(--text-2xl); }
.w4-text-3xl { font-size: var(--text-3xl); }
.w4-text-4xl { font-size: var(--text-4xl); }

.w4-uppercase { text-transform: uppercase; }
.w4-lowercase { text-transform: lowercase; }
.w4-capitalize { text-transform: capitalize; }

.w4-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w4-line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.w4-line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Position */
.w4-relative { position: relative; }
.w4-absolute { position: absolute; }
.w4-fixed { position: fixed; }
.w4-sticky { position: sticky; }

/* Display */
.w4-block { display: block; }
.w4-inline-block { display: inline-block; }
.w4-inline { display: inline; }

/* Cursor */
.w4-cursor-pointer { cursor: pointer; }
.w4-cursor-not-allowed { cursor: not-allowed; }

/* Opacity */
.w4-opacity-0 { opacity: 0; }
.w4-opacity-50 { opacity: 0.5; }
.w4-opacity-75 { opacity: 0.75; }
.w4-opacity-100 { opacity: 1; }

/* Overflow */
.w4-overflow-hidden { overflow: hidden; }
.w4-overflow-auto { overflow: auto; }
.w4-overflow-x-auto { overflow-x: auto; }
.w4-overflow-y-auto { overflow-y: auto; }

/* Z-Index */
.w4-z-0 { z-index: 0; }
.w4-z-10 { z-index: 10; }
.w4-z-20 { z-index: 20; }
.w4-z-50 { z-index: 50; }

/* ============================================
   DARK MODE TOGGLE
   ============================================ */

.w4-theme-toggle {
  position: relative;
  width: 48px;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  padding: 2px;
  transition: background var(--transition-base);
}

.w4-theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .w4-theme-toggle {
  background: var(--color-primary);
}

[data-theme="dark"] .w4-theme-toggle::after {
  transform: translateX(24px);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .w4-mobile-nav,
  .w4-fab,
  .w4-no-print {
    display: none !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  .w4-card {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
