/**
 * Main Styles
 * Global styles and layout
 */

/* Google Fonts are now loaded asynchronously in HTML head for better performance */
/* Removed @import to eliminate render-blocking font loading */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --logo-blue: #3b82f6;
  --logo-gray: #374151;
  --logo-dark-gray: #1f2937;
  --logo-bright-blue: #60a5fa;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #111827;
  --footer-bg: #0f172a;
  --border-color: #e5e7eb;
  --border-light: #f1f5f9;
  --max-width: 1280px;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

/* Button hover effects - replaces inline onmouseover/onmouseout */
.btn-hover-gray {
  background: var(--logo-gray);
  color: #ffffff;
  transition: background 0.2s ease;
}

.btn-hover-gray:hover {
  background: var(--logo-dark-gray);
}

.card-hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-hover-lift-alt {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift-alt:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.btn-hover-dark {
  background: #374151;
  color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

.btn-hover-dark:hover {
  background: #1f2937;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(55, 65, 81, 0.4);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
  width: 100%;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-color);
  letter-spacing: -0.03em;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background-color: var(--logo-blue);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: var(--shadow);
}

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

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--logo-blue);
  border: 2px solid var(--logo-blue);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--logo-blue);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

.btn-nav {
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  margin-left: 1rem;
}

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Sections */
.section {
  padding: 6rem 0;
  background-color: #ffffff;
  position: relative;
}

.section-alt {
  background-color: #f8fafc;
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Section Transitions */
.section-transition-top {
  position: relative;
  overflow: hidden;
}

.section-transition-top::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, transparent 0%, rgba(30, 58, 138, 0.1) 50%, rgba(30, 58, 138, 0.2) 100%);
  pointer-events: none;
}

.section-transition-bottom {
  position: relative;
  overflow: hidden;
}

.section-transition-bottom::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(0deg, transparent 0%, rgba(30, 58, 138, 0.1) 50%, rgba(30, 58, 138, 0.2) 100%);
  pointer-events: none;
}

/* Smooth gradient transitions between dark and light sections */
.section-dark-to-light {
  position: relative;
  overflow: hidden;
}

.section-dark-to-light::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.4) 0%, rgba(30, 58, 138, 0.2) 30%, rgba(248, 250, 252, 0.3) 60%, rgba(248, 250, 252, 0.1) 80%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.section-automation {
  position: relative;
  overflow: hidden;
  margin-top: -60px;
  margin-bottom: -60px;
  z-index: -1;
}

.hero-section {
  border-radius: 0 0 60px 60px;
}

.toolkit-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .toolkit-grid {
    max-width: 100%;
  }
  
  .toolkit-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
}

.section-light-to-dark {
  position: relative;
  overflow: hidden;
}

.section-light-to-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(0deg, rgba(30, 58, 138, 0.4) 0%, rgba(30, 58, 138, 0.2) 30%, rgba(248, 250, 252, 0.3) 60%, rgba(248, 250, 252, 0.1) 80%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* Toolkit Buttons */
.toolkit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  background: #374151;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  width: fit-content;
}

.toolkit-btn:hover {
  background: #ffffff;
  color: #1f2937;
}

.section-dark {
  background-color: var(--bg-dark);
  color: #ffffff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: #ffffff;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

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

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

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

/* Hero Section */
.hero {
  padding: 8rem 0 10rem;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 30%, #1e3a8a 70%, #172554 100%);
  color: #ffffff;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: -1px;
}

.hero-unified {
  padding: 4rem 0 6rem !important;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
  pointer-events: none;
  opacity: 0.3;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 2rem;
  font-size: 4rem;
  font-weight: 600;
  line-height: 1.1;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.05em;
}

.hero h1 .highlight {
  color: #93c5fd;
  display: inline-block;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 0 auto;
}

.hero-input {
  flex: 1;
  min-width: 300px;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: #ffffff;
  color: var(--text-color);
}

.hero-input::placeholder {
  color: var(--text-light);
}

.hero-btn-primary {
  padding: 1rem 2.5rem;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.hero-btn-primary:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4);
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: var(--border-color);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #60a5fa;
}

/* Mobile Styles */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero h1 {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
  }

  /* Inline hero styles override for mobile */
  .hero h1[style*="font-size: 3.5rem"] {
    font-size: 2rem !important;
  }

  .hero p[style*="font-size: 1.5rem"] {
    font-size: 1.125rem !important;
  }

  .hero p[style*="font-size: 1.25rem"] {
    font-size: 1rem !important;
  }

  .toolkit-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .section-automation {
    margin-top: -40px;
    margin-bottom: -40px;
    padding: 5rem 0 !important;
  }

  .hero-section {
    border-radius: 0 0 40px 40px;
  }

  .section-automation h2 {
    font-size: 2rem;
  }

  .section-automation p {
    font-size: 1.125rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-input {
    width: 100%;
    min-width: auto;
  }

  .hero-btn-primary {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: 2rem !important;
  }

  /* Case study specific mobile styles */
  .case-study-hero h1[style*="font-size: 3rem"] {
    font-size: 1.875rem !important;
  }

  .case-study-hero .case-study-intro[style*="font-size: 1.25rem"] {
    font-size: 1rem !important;
  }

  h2[style*="font-size: 2.75rem"] {
    font-size: 1.75rem !important;
  }

  /* Case study metrics grid mobile - stack to single column */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  [style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Table mobile responsiveness */
  table {
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  table thead,
  table tbody,
  table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  table th,
  table td {
    padding: 0.75rem 0.5rem !important;
    word-wrap: break-word;
  }

  /* Large font sizes mobile */
  p[style*="font-size: 1.25rem"] {
    font-size: 1rem !important;
  }

  /* Container max-width mobile adjustments */
  div[style*="max-width: 1000px"],
  div[style*="max-width: 900px"],
  div[style*="max-width: 800px"] {
    max-width: 100% !important;
  }

  /* Auto-fit grid mobile - ensure single column */
  [style*="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }

  /* Case study hero mobile padding */
  .case-study-hero[style*="padding: 5rem 0 4rem"] {
    padding: 3rem 0 2.5rem !important;
  }

  /* Section padding mobile */
  .section[style*="padding: 5rem 0"] {
    padding: 3rem 0 !important;
  }

  /* Index page specific mobile adjustments */
  .hero-unified .grid-2 {
    gap: 2rem !important;
  }

  .hero-unified .grid-2 > div:last-child {
    margin-top: 2rem;
  }

  /* Index page Digital Relevance section mobile */
  .hero-unified h2[style*="font-size: 2.75rem"] {
    font-size: 2rem !important;
  }

  .hero-unified ul li {
    padding: 1rem 0 !important;
    font-size: 1rem !important;
  }

  /* Toolkit buttons mobile */
  .toolkit-grid {
    gap: 0.5rem !important;
  }

  .toolkit-btn {
    font-size: 0.8125rem !important;
    padding: 0.625rem 0.875rem !important;
  }

  .btn-nav {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  /* Hero section mobile adjustments */
  .hero-unified {
    padding: 3rem 0 2.5rem !important;
  }

  .hero-unified h1 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }

  .hero-unified p {
    font-size: 1rem !important;
  }

  /* Portfolio cards mobile */
  .portfolio-item {
    margin-bottom: 2rem;
  }

  .portfolio-item img {
    height: 200px !important;
  }

  .portfolio-item h3 {
    font-size: 1.25rem !important;
  }

  /* Stats section mobile */
  .section-alt h2 {
    font-size: 2rem !important;
  }

  .section-alt .grid-4 > div {
    padding: 1.5rem !important;
  }

  .section-alt .grid-4 > div > div:first-child {
    font-size: 2.5rem !important;
  }

  /* CTA sections mobile */
  .section-dark h2 {
    font-size: 1.875rem !important;
  }

  .section-dark p {
    font-size: 1.125rem !important;
  }

  .section-dark .btn {
    width: 100%;
    padding: 1rem 2rem !important;
  }

  /* Section padding mobile */
  .section {
    padding: 3rem 0 !important;
  }

  /* Card padding mobile */
  .card {
    padding: 1.5rem !important;
  }

  /* Grid gaps mobile */
  .grid-2 {
    gap: 2rem !important;
  }

  /* Portfolio grid mobile */
  .portfolio-item .card {
    padding: 1.5rem !important;
  }

  /* Service tags mobile */
  .portfolio-item span[style*="background: #60a5fa"] {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.625rem !important;
  }

  /* Contact form mobile */
  .grid-2 .card {
    margin-bottom: 2rem;
  }

  /* About page mobile */
  .container-narrow {
    padding: 0 1rem;
  }

  /* Table mobile - make scrollable if needed */
  .pricing-service-details-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pricing-service-details-table thead,
  .pricing-service-details-table tbody,
  .pricing-service-details-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  /* Portfolio page specific mobile */
  .portfolio-item {
    margin-bottom: 2rem;
  }

  .portfolio-item > div:first-child {
    height: 200px !important;
  }

  /* Stats numbers mobile */
  .section-alt [style*="font-size: 3.5rem"] {
    font-size: 2.5rem !important;
  }

  /* Button full width on mobile */
  .btn {
    width: 100%;
    text-align: center;
  }

  /* Contact form mobile */
  #contact-form {
    gap: 1rem !important;
  }

  /* About page values grid mobile */
  .grid-2 .card {
    margin-bottom: 1.5rem;
  }

  /* Hero unified border radius mobile */
  .hero-unified[style*="border-radius: 0 0 60px 60px"] {
    border-radius: 0 0 40px 40px !important;
  }

  /* Image responsiveness */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Portfolio visit links mobile */
  .portfolio-visit-link {
    font-size: 0.9375rem !important;
  }

  /* Contact page mobile - prevent zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
  }

  /* About page leadership section mobile */
  .container-narrow p {
    font-size: 1rem !important;
  }

  /* Stats section mobile spacing */
  .section-alt {
    padding: 3rem 0 !important;
  }

  .section-dark {
    padding: 3rem 0 !important;
  }

  /* Portfolio cards mobile spacing */
  .portfolio-item {
    margin-bottom: 2rem;
  }

  /* Service tags mobile wrap better */
  .portfolio-item div[style*="display: flex; flex-wrap"] {
    gap: 0.375rem !important;
  }
}

