/*
Theme Name: Tamfitronics Enterprise
Theme URI: https://tamfitronics.com
Author: Tamfis Nig. Ltd.
Author URI: https://tamfitronics.com
Description: A premium, all-in-one enterprise WordPress theme for consulting, marketing, blogs, news, Q&A, forums, and e-commerce. Dual-mode (light/dark), dirty orange dominant brand, premium typography, zero build tools.
Version: 2.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tamfitronics-enterprise
Domain Path: /languages
Tags: one-column, two-columns, right-sidebar, custom-colors, custom-menu, featured-images, full-site-editing, threaded-comments, translation-ready, woocommerce, block-patterns

Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
*/

/* ================================================================
   CRITICAL CSS - Above-the-fold rendering
   ================================================================ */

/* CSS Custom Properties - Light Mode (Default) */
:root {
  /* Brand Colors - Dirty Orange Dominant */
  --color-primary-50: #fff7ed;
  --color-primary-100: #ffedd5;
  --color-primary-200: #fed7aa;
  --color-primary-300: #fdba74;
  --color-primary-400: #fb923c;
  --color-primary-500: #f97316;
  --color-primary-600: #ea580c;
  --color-primary-700: #c2410c;
  --color-primary-800: #9a3412;
  --color-primary-900: #7c2d12;
  --color-primary-950: #431407;

  /* Slate Neutrals */
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  /* Semantic Mappings - Light Mode */
  --bg-body: #ffffff;
  --bg-surface: var(--color-slate-50);
  --bg-surface-elevated: #ffffff;
  --bg-surface-sunken: var(--color-slate-100);
  --bg-primary: var(--color-primary-700);
  --bg-primary-hover: var(--color-primary-800);
  --bg-secondary: var(--color-slate-800);
  --bg-secondary-hover: var(--color-slate-900);
  --bg-accent: var(--color-primary-100);
  --bg-accent-hover: var(--color-primary-200);
  --bg-danger: #fef2f2;
  --bg-success: #f0fdf4;
  --bg-warning: #fffbeb;

  --text-primary: var(--color-slate-900);
  --text-secondary: var(--color-slate-600);
  --text-tertiary: var(--color-slate-500);
  --text-inverse: #ffffff;
  --text-link: var(--color-primary-700);
  --text-link-hover: var(--color-primary-800);
  --text-on-primary: #ffffff;
  --text-on-secondary: #ffffff;

  --border-light: var(--color-slate-200);
  --border-medium: var(--color-slate-300);
  --border-strong: var(--color-slate-400);
  --border-primary: var(--color-primary-300);

  /* Shadows - Light */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow-primary: 0 0 20px rgb(194 65 12 / 0.3);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.65vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --font-size-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --font-size-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem);
  --font-size-5xl: clamp(3rem, 2.5rem + 2.5vw, 5rem);
  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --header-height: 72px;
  --header-height-mobile: 64px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-body: var(--color-slate-950);
  --bg-surface: var(--color-slate-900);
  --bg-surface-elevated: var(--color-slate-800);
  --bg-surface-sunken: var(--color-slate-950);
  --bg-primary: var(--color-primary-600);
  --bg-primary-hover: var(--color-primary-500);
  --bg-secondary: var(--color-slate-700);
  --bg-secondary-hover: var(--color-slate-600);
  --bg-accent: var(--color-primary-950);
  --bg-accent-hover: var(--color-primary-900);

  --text-primary: var(--color-slate-50);
  --text-secondary: var(--color-slate-300);
  --text-tertiary: var(--color-slate-400);
  --text-inverse: var(--color-slate-900);
  --text-link: var(--color-primary-400);
  --text-link-hover: var(--color-primary-300);
  --text-on-primary: #ffffff;
  --text-on-secondary: #ffffff;

  --border-light: var(--color-slate-800);
  --border-medium: var(--color-slate-700);
  --border-strong: var(--color-slate-600);
  --border-primary: var(--color-primary-800);

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
  --shadow-glow-primary: 0 0 30px rgb(249 115 22 / 0.2);
}

/* Base Reset */
*, *::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(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: background-color var(--transition-base), color var(--transition-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Prevent FOUC - Apply theme before render */
html[data-theme="dark"] body {
  background-color: var(--color-slate-950);
  color: var(--color-slate-50);
}

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

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

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

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }
.container-2xl { max-width: var(--container-2xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* WordPress Core Alignments */
.alignleft { float: left; margin-right: var(--space-6); margin-bottom: var(--space-4); }
.alignright { float: right; margin-left: var(--space-6); margin-bottom: var(--space-4); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: var(--container-xl); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* Screen Reader Text (WordPress standard) */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--bg-surface);
  border-radius: 3px;
  box-shadow: var(--shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--text-primary);
  display: block;
  font-size: var(--font-size-base);
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: var(--space-4) var(--space-6);
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--bg-primary);
  color: var(--text-on-primary);
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 99999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
