/* Custom CSS for Inbox Marketing Website */
/* Tailwind CSS handles most styling - this file contains only custom additions */

/* ========================================
   CSS Variables and Custom Properties
   ======================================== */
:root {
  /* Brand Colors (matching Tailwind config) */
  --color-primary: #0066FF;
  --color-secondary: #00CC66;
  --color-accent: #FF6600;
  
  /* Extended Color Palette */
  --color-primary-light: #3385FF;
  --color-primary-dark: #0052CC;
  --color-secondary-light: #33D47D;
  --color-secondary-dark: #00A352;
  --color-accent-light: #FF8533;
  --color-accent-dark: #CC5200;
  
  /* Typography */
  --font-primary: 'Roboto', sans-serif;
  --font-heading: 'Roboto Slab', serif;
  
  /* Spacing (8pt Grid System) */
  --spacing-xs: 0.5rem;    /* 8px */
  --spacing-sm: 1rem;      /* 16px */
  --spacing-md: 1.5rem;    /* 24px */
  --spacing-lg: 2rem;      /* 32px */
  --spacing-xl: 3rem;      /* 48px */
  --spacing-2xl: 4rem;     /* 64px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* ========================================
   Base Styles and Typography
   ======================================== */
.font-serif {
  font-family: var(--font-heading);
}

.font-sans {
  font-family: var(--font-primary);
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* Account for sticky header */
}

/* ========================================
   Custom Component Styles
   ======================================== */

/* Enhanced focus states for accessibility */
.focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Custom button hover effects */
.btn-primary {
  background-color: var(--color-primary);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-accent {
  background-color: var(--color-accent);
  transition: all var(--transition-normal);
}

.btn-accent:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced form styles */
.form-input {
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(0 102 255 / 0.1);
}

/* Enhanced card hover effects */
.card-hover {
  transition: all var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Client logo hover effects */
.client-logo {
  transition: all var(--transition-normal);
  filter: grayscale(100%);
  opacity: 0.7;
}

.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* ========================================
   Navigation Enhancements
   ======================================== */

/* Smooth mobile menu transitions */
.mobile-menu {
  transition: all var(--transition-normal);
  transform-origin: top;
}

.mobile-menu.hidden {
  transform: scaleY(0);
  opacity: 0;
}

.mobile-menu.visible {
  transform: scaleY(1);
  opacity: 1;
}

/* Active navigation state */
.nav-link.active {
  color: var(--color-primary);
  font-weight: 500;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 1px;
}

/* ========================================
   Hero Section Enhancements
   ======================================== */

/* Gradient overlay for hero background */
.hero-overlay {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  position: relative;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.9), rgba(0, 82, 204, 0.8));
  z-index: 1;
}

.hero-overlay > * {
  position: relative;
  z-index: 2;
}

/* ========================================
   Animation Classes
   ======================================== */

/* Fade in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in from left */
.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all var(--transition-slow);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all var(--transition-slow);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale animation */
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: all var(--transition-slow);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   Loading States
   ======================================== */

.loading {
  position: relative;
  overflow: hidden;
}

.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ========================================
   Responsive Design Enhancements
   ======================================== */

/* Enhanced touch targets for mobile */
@media (max-width: 768px) {
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Larger padding for mobile form inputs */
  .form-input {
    padding: 1rem;
  }
  
  /* Enhanced mobile typography */
  .mobile-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .no-print {
    display: none !important;
  }
  
  .print-block {
    display: block !important;
  }
  
  * {
    color: black !important;
    background: white !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* ========================================
   High Contrast Mode Support
   ======================================== */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #0000FF;
    --color-secondary: #008000;
    --color-accent: #FF4500;
  }
  
  .card-hover:hover {
    border: 2px solid currentColor;
  }
}

/* ========================================
   Reduced Motion Support
   ======================================== */

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

/* ========================================
   Dark Mode Preparation (for future use)
   ======================================== */

@media (prefers-color-scheme: dark) {
  .dark-mode-ready {
    /* Dark mode styles would go here if needed in future */
    /* Currently not implemented as per brand requirements */
  }
}

/* ========================================
   Utility Classes
   ======================================== */

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

.sr-only.focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Image aspect ratio utilities */
.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* Content width constraints */
.content-width {
  max-width: 65ch;
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* GPU acceleration for animations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Optimize image rendering */
img {
  height: auto;
  max-width: 100%;
}

/* Critical above-fold styles would be inlined in production */