/**
 * ==============================================================================
 * SHA INNOVATIVE TECHNOLOGIES - CORE DESIGN SYSTEM & BASE STYLES
 * File: css/style.css
 * Description: Design tokens, CSS variables, typography, layout grid & reset.
 * Framework-free, lightweight, high performance static frontend architecture.
 * ==============================================================================
 */

/* -------------------------------------------------------------------------- */
/* 1. GOOGLE FONTS IMPORT                                                      */
/* -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* -------------------------------------------------------------------------- */
/* 2. DESIGN TOKENS & CSS VARIABLES                                           */
/* -------------------------------------------------------------------------- */
:root {
  /* ======================================================================== */
  /* SHA INNOVATIVE TECHNOLOGIES - BRAND DESIGN TOKENS                        */
  /* ======================================================================== */
  
  /* Primary Brand Purple */
  --color-primary: #6D28D9;          /* Signature SHA Purple / Violet */
  --color-primary-dark: #4C1D95;     /* Deep Royal Purple */
  --color-primary-light: #7C3AED;    /* Bright Accent Purple */
  --color-primary-subtle: #EDE9FE;   /* Soft Lavender Badge & Highlight */

  /* Dark Corporate & Footer Deep Purple */
  --color-dark-purple: #16082B;      /* Deep Midnight Purple for Footer & Dark Hero/Cards */
  --color-dark-purple-card: #220E3E; /* Elevated Dark Surface */
  
  /* Logo Accent: Tech Blue & Electric Cyan */
  --color-secondary: #2563EB;        /* Logo Tech Blue */
  --color-secondary-dark: #1D4ED8;   /* Deep Blue */
  --color-secondary-light: #3B82F6;  /* Bright Blue */
  
  --color-accent: #00D4B2;           /* Logo Innovation Cyan/Teal */
  --color-accent-dark: #00A88D;      /* Deep Cyan */
  --color-accent-subtle: #E6FBF7;    /* Subtle Cyan Tint */

  /* Surface & Background Palette (Light Lavender & Clean White) */
  --color-bg: #FFFFFF;               /* Crisp White Canvas */
  --color-surface-lavender: #F7F5FE; /* Secondary Light Lavender Section Background */
  --color-surface: #F8F6FE;          /* Soft Lavender Surface */
  --color-surface-card: #FFFFFF;     /* Pure White Card Surface */
  --color-surface-hover: #F1EDFD;    /* Lavender Interactive Hover */
  --color-surface-contrast: #16082B; /* Dark Purple Contrast Surface */
  
  /* Text & Typography Colors (Charcoal / Slate for Crystal Clarity) */
  --color-text-primary: #0F172A;     /* Slate 900 (High Contrast Headings) */
  --color-text-secondary: #334155;   /* Slate 700 (High Readability Body) */
  --color-text-muted: #64748B;       /* Slate 500 (Captions & Supporting Text) */
  --color-text-white: #FFFFFF;       /* Pure White for Dark BGs */
  --color-text-lavender: #DDD6FE;    /* Soft Lavender for Dark BG Subtitles */
  --color-text-inverse-muted: #CBD5E1;

  /* Border & Divider Tokens */
  --color-border: #E2E8F0;           /* Clean Border (Slate 200) */
  --color-border-subtle: #F1F5F9;    /* Extra Soft Border */
  --color-border-purple: #DDD6FE;    /* Lavender Accent Border */
  --color-border-dark: #CBD5E1;      /* Crisp Darker Border */
  --color-border-focus: #6D28D9;     /* Brand Purple Focus Ring */

  /* Semantic / Status Colors */
  --color-success: #10B981;          /* Emerald Green */
  --color-success-subtle: #ECFDF5;
  --color-warning: #F59E0B;          /* Amber */
  --color-warning-subtle: #FFFBEB;
  --color-error: #EF4444;            /* Crimson Red */
  --color-error-subtle: #FEF2F2;
  --color-info: #0284C7;             /* Ocean Info */
  --color-info-subtle: #F0F9FF;

  /* Typography Font Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography Scale (Fluid Modular Hierarchy) */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1.125rem;   /* 18px */
  --font-size-lg: 1.25rem;    /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 1.875rem;  /* 30px */
  --font-size-3xl: 2.25rem;   /* 36px */
  --font-size-4xl: 3rem;      /* 48px */
  --font-size-5xl: 3.75rem;   /* 60px */

  /* Line Heights */
  --line-height-tight: 1.15;
  --line-height-heading: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.68;

  /* Font Weights */
  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Spacing Scale */
  --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: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows (Curated, subtle, multi-layered) */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 16px 32px -4px rgba(10, 37, 64, 0.12), 0 6px 12px -4px rgba(10, 37, 64, 0.06);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout Widths */
  --container-max-width: 1240px;
  --container-narrow-width: 860px;
  --header-height: 76px;

  /* Z-Index Hierarchy */
  --z-negative: -1;
  --z-base: 1;
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* -------------------------------------------------------------------------- */
/* 3. MODERN CSS RESET & BOX MODEL                                            */
/* -------------------------------------------------------------------------- */
*,
*::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 {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--fw-normal);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

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

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* -------------------------------------------------------------------------- */
/* 4. BASE TYPOGRAPHY SYSTEM                                                  */
/* -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  font-weight: var(--fw-bold);
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-4xl);
  line-height: var(--line-height-tight);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

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

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

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
}

h6 {
  font-size: var(--font-size-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-1);
}

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

p:last-child {
  margin-bottom: 0;
}

.text-lead {
  font-size: var(--font-size-md);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

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

.text-xs {
  font-size: var(--font-size-xs);
}

.text-white {
  color: var(--color-text-white) !important;
}

.text-lavender {
  color: var(--color-text-lavender) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.text-accent {
  color: var(--color-accent) !important;
}

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

/* -------------------------------------------------------------------------- */
/* 5. LAYOUT CONTAINERS & UTILITIES                                           */
/* -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow-width);
}

.container-fluid {
  width: 100%;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  position: relative;
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-lg {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.bg-white {
  background-color: var(--color-bg);
}

.bg-surface {
  background-color: var(--color-surface);
}

.bg-lavender {
  background-color: var(--color-surface-lavender);
}

.bg-dark {
  background-color: var(--color-primary);
  color: var(--color-text-white);
}

.bg-deep-purple {
  background-color: var(--color-dark-purple);
  color: var(--color-text-white);
}

.bg-deep-purple h1,
.bg-deep-purple h2,
.bg-deep-purple h3,
.bg-deep-purple h4,
.bg-deep-purple h5,
.bg-deep-purple h6 {
  color: var(--color-text-white);
}

.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6 {
  color: var(--color-text-white);
}

/* Flexbox & Grid Helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Accessibility & Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-to-main,
.skip-to-content {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-secondary);
  color: var(--color-text-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  font-weight: var(--fw-semibold);
  transition: top var(--transition-fast);
}

.skip-to-main:focus,
.skip-to-content:focus {
  top: var(--space-4);
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Reduced motion preference support */
@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;
  }
}
