/* ============================================================================
   STARKS ENTERPRISE WEBSITE REDESIGN
   Modern SaaS-Style Design System
   
   This CSS framework provides the foundation for converting the Starks Enterprise
   website to a Britive-style modern SaaS aesthetic.
   
   Structure:
   1. Design Tokens (colors, typography, spacing)
   2. Base Styles (reset, global)
   3. Typography System
   4. Component Base Classes
   5. Utility Classes
   6. Animation Keyframes
   7. Responsive Breakpoints
   
   ============================================================================ */

/* ============================================================================
   1. DESIGN TOKENS
   ============================================================================ */

:root {
  /* ---- COLOR PALETTE ---- */
  
  /* Primary Brand Colors */
  --primary-blue: #0052CC;
  --primary-blue-dark: #003A99;
  --primary-blue-light: #0066FF;
  
  /* Accent Colors */
  --accent-orange: #E04B00;
  --accent-orange-dark: #B83A00;
  --accent-orange-light: #FF5F1F;
  
  /* Semantic Colors */
  --success-green: #10B981;
  --danger-red: #EF4444;
  --warning-yellow: #F59E0B;
  --info-blue: #3B82F6;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --black: #000000;

  /* ---- SEMANTIC ALIASES & THEME TOKENS ---- */
  --color-primary: #0F172A;
  --color-accent: #0052CC;
  --color-accent-hover: #003A99;
  --color-text: #374151;
  --color-muted: #6B7280;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-accent-light: rgba(0, 82, 204, 0.05);
  --border-subtle: #E2E8F0;

  /* Brand Logo Components */
  --brand-navy: #173b56;
  --brand-teal: #0d8f94;
  --brand-gold: #da9b32;

  /* Spacing Aliases */
  --spacing-1: 4px;
  --spacing-2: 8px;
  --spacing-3: 12px;
  --spacing-4: 16px;
  --spacing-5: 24px;
  --spacing-6: 32px;
  --spacing-7: 48px;
  --spacing-8: 64px;
  
  /* ---- TYPOGRAPHY ---- */
  
  /* Font Families */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-mono: "Fira Code", "Courier New", monospace;
  
  /* Font Sizes (px) */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 48px;
  --text-5xl: 64px;
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Letter Spacing */
  --tracking-tight: -0.5px;
  --tracking-normal: 0px;
  --tracking-wide: 0.5px;
  
  /* ---- SPACING (8px grid system) ---- */
  
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  
  /* ---- BORDER & RADIUS ---- */
  
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-base: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Border Width */
  --border-0: 0;
  --border-1: 1px;
  --border-2: 2px;
  --border-4: 4px;
  
  /* ---- SHADOWS ---- */
  
  --shadow-none: none;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* ---- TRANSITIONS & ANIMATIONS ---- */
  
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;
  
  --timing-linear: linear;
  --timing-ease: ease;
  --timing-ease-in: ease-in;
  --timing-ease-out: ease-out;
  --timing-ease-in-out: ease-in-out;
  
  /* ---- Z-INDEX SCALE ---- */
  
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  
  /* ---- CONTAINER SIZES ---- */
  
  --container-xs: 320px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-max: min(100%, 1280px);
}

/* Brand Logo Component */
.brand-logo {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  transition: opacity var(--duration-200);
}

.brand-logo:hover {
  opacity: 0.88;
  text-decoration: none;
}

.brand-logo__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: #173b56;
  text-transform: uppercase;
}

.brand-logo__subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: #0d8f94;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================================================
   2. BASE STYLES & RESET
   ============================================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ============================================================================
   3. TYPOGRAPHY SYSTEM
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  color: var(--gray-900);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
}

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

h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

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

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--duration-200) var(--timing-ease);
}

a:hover {
  color: var(--primary-blue-dark);
  text-decoration: underline;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
}

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

/* ============================================================================
   4. COMPONENT BASE CLASSES
   ============================================================================ */

/* Container */
.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-max {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Hero Section */
.hero {
  position: relative;
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero__heading {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
  color: var(--white);
}

.hero__subheading {
  font-size: var(--text-xl);
  font-weight: var(--font-normal);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
  opacity: 0.95;
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Section */
.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  border-bottom: var(--border-1) solid var(--gray-200);
}

.section__heading {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section__title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Card */
.card {
  background: var(--white);
  border: var(--border-1) solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--duration-300) var(--timing-ease);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-blue);
}

.card__header {
  margin-bottom: var(--space-6);
}

.card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.card__subtitle {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.card__body {
  margin-bottom: var(--space-6);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

.card__footer {
  display: flex;
  gap: var(--space-4);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  border: var(--border-1) solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--duration-200) var(--timing-ease);
  text-decoration: none;
}

.btn--primary {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn--primary:hover {
  background-color: var(--primary-blue-dark);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background-color: var(--gray-100);
  color: var(--gray-900);
  border-color: var(--gray-300);
}

.btn--secondary:hover {
  background-color: var(--gray-200);
}

.btn--outline {
  background-color: transparent;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn--outline:hover {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn--full {
  width: 100%;
}

/* Badge */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.badge--success {
  background-color: #D1FAE5;
  color: var(--success-green);
}

/* ============================================================================
   5. UTILITY CLASSES
   ============================================================================ */

/* Display & Visibility */
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

/* Flexbox */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-4 {
  gap: var(--space-4);
}

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

.gap-8 {
  gap: var(--space-8);
}

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

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

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

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

.text-secondary {
  color: var(--gray-600);
}

.font-bold {
  font-weight: var(--font-bold);
}

.font-semibold {
  font-weight: var(--font-semibold);
}

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

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

/* Width & Height */
.w-full {
  width: 100%;
}

.max-w-prose {
  max-width: 65ch;
}

.max-w-lg {
  max-width: 512px;
}

.max-w-2xl {
  max-width: 896px;
}

/* Opacity */
.opacity-75 {
  opacity: 0.75;
}

.opacity-50 {
  opacity: 0.5;
}

/* ============================================================================
   6. ANIMATION KEYFRAMES
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animation Classes */
.animate-fadeIn {
  animation: fadeIn var(--duration-500) var(--timing-ease-out);
}

.animate-slideInUp {
  animation: slideInUp var(--duration-500) var(--timing-ease-out);
}

.animate-slideInDown {
  animation: slideInDown var(--duration-500) var(--timing-ease-out);
}

.animate-pulse {
  animation: pulse var(--duration-1000) var(--timing-ease-in-out) infinite;
}

.animate-float {
  animation: float var(--duration-300) var(--timing-ease-in-out);
}

/* ============================================================================
   7. RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Mobile First Approach */

@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  .hero {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  
  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  
  .hero__heading {
    font-size: var(--text-3xl);
  }
  
  .hero__subheading {
    font-size: var(--text-base);
  }
}

@media (min-width: 768px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* ============================================================================
   8. ACCESSIBILITY
   ============================================================================ */

/* Focus Visible */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast */
@media (prefers-contrast: more) {
  body {
    color: var(--black);
  }
  
  a {
    text-decoration: underline;
  }
}

/* Dark Mode (Future Enhancement) */
@media (prefers-color-scheme: dark) {
  /* To be implemented */
}

/* ============================================================================
   9. PRINT STYLES
   ============================================================================ */

@media print {
  body {
    background: white;
  }
  
  a {
    text-decoration: underline;
  }
  
  button,
  .btn {
    display: none;
  }
}

/* ============================================================================
   END OF REDESIGN.CSS
   ============================================================================ */
