/* Toledo AI Solutions - Premium Design System */

:root {
  /* Core Palette - Premium Deep Space & Editorial Stone */
  --bg-dark: #0F0B1F;
  --bg-hero-1: #1B1536;
  --bg-hero-2: #0B0816;
  --bg-light: #FFFFFF;
  --bg-light-alt: #F5F4F0; /* Warm stone background */

  /* Semantic Colors */
  --color-bg: var(--bg-dark);
  --color-surface: #FFFFFF;
  --color-text: #1C1B22; /* Softer dark charcoal */
  --color-text-inv: #FFFFFF;
  --color-muted: #62606C; /* Softer gray */
  --color-border: #E4E3E8;

  /* Accents */
  --accent-1: #5B7FFF; /* Calm Indigo */
  --accent-2: #3AAFB9; /* Teal */
  --accent-3: #E85D9B; /* Soft Rose */

  /* Legacy mapping for compatibility */
  --bg-void: var(--bg-dark);
  --bg-stars: var(--bg-hero-2);
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-glass-dark: rgba(15, 11, 31, 0.7);
  --bg-glass-hover: rgba(255, 255, 255, 1);

  /* Text Colors Legacy */
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-light: #FFFFFF;
  --text-dark: #1C1B22;
  --text-dark-muted: #5C5A6A;

  --primary: var(--accent-1);
  --primary-glow: rgba(91, 127, 255, 0.25);
  --accent: var(--accent-2);
  --accent-glow: rgba(58, 175, 185, 0.25);

  --border-light: var(--color-border);
  --border-glow: rgba(91, 127, 255, 0.15);

  /* Refined Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;

  /* Gradients - More refined, less saturated */
  --gradient-hero: linear-gradient(135deg, var(--bg-hero-1) 0%, var(--bg-hero-2) 100%);
  --gradient-text: linear-gradient(to right, #ffffff 30%, var(--accent-2) 100%);
  --gradient-text-dark: linear-gradient(to right, var(--accent-1) 0%, var(--accent-3) 100%);

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 80px;

  /* Shadows - Directional, soft and organic */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 8px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.1), 0 4px 16px -4px rgba(0, 0, 0, 0.03);

  /* Legacy shadow mappings to prevent breaks */
  --shadow-void: var(--shadow-lg);
  --shadow-neopop: var(--shadow-md);
  --shadow-soft: var(--shadow-md);
  --shadow-glow: 0 0 15px rgba(91, 127, 255, 0.15);
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-1);
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.3s ease;
}

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

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

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--color-surface);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

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

h1 {
  font-size: clamp(3.2rem, 7vw, 5rem);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 2rem;
  font-weight: 600;
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: 1rem;
  font-weight: 600;
}

p {
  color: var(--color-muted);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Components - Modern Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  color: var(--color-text);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 127, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

/* Flat Card Variant */
.card-flat {
  background: var(--color-surface);
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}

/* Case Study Results Card Override */
.bg-blue-50 {
  background: #F8FAFC !important;
  border: 1px solid var(--border-light);
  color: var(--color-text);
}

.text-gray-600 {
  color: var(--color-muted) !important;
}

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

.bg-white,
.bg-light {
  background: transparent !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: var(--text-sm);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--accent-1);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(91, 127, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(91, 127, 255, 0.3);
  background: #486CFA;
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(91, 127, 255, 0.04);
}

.btn-outline-white {
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: white;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: background 0.3s ease;
  background: rgba(15, 11, 31, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu-btn {
  display: none;
}

.nav-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-2);
}

/* Hero Section */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
  background: var(--bg-dark);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(58, 175, 185, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(232, 93, 155, 0.08) 0%, transparent 45%),
    var(--gradient-hero);
  color: var(--color-text-inv);
}

.hero h1,
.hero h2,
.hero h3,
.hero p {
  color: var(--color-text-inv);
}

.hero p {
  color: rgba(255, 255, 255, 0.8);
}

.hero-inner {
  min-height: 45vh !important;
  align-items: center;
}

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

#hero-canvas {
  opacity: 0.55;
}

/* Layout Utilities & Spacing Rhythm */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section-sm {
  padding: 4rem 0;
}

.section-lg {
  padding: 8rem 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.process-step {
  background: var(--color-surface);
  border: 1px solid var(--border-light);
  padding: 2.5rem;
  border-radius: 0.75rem;
  position: relative;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step:hover {
  transform: translateY(-3px);
  border-color: var(--accent-1);
  box-shadow: var(--shadow-md);
}

.process-step-number {
  width: 44px;
  height: 44px;
  background: var(--accent-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1.25rem;
  color: white;
}

/* Asymmetric / Creative Helpers */
.feature-icon {
  font-size: 2.5rem;
  color: var(--accent-1);
  margin-bottom: 1.25rem;
  display: inline-block;
  background: transparent !important;
  padding: 0 !important;
}

/* Feature lists */
ul li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}

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

.material-symbols-outlined {
  vertical-align: middle;
}

/* Animations Scroll Reveal */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
}

/* Mobile Media Queries */
@media (max-width: 768px) {
  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    color: white;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 2rem;
  }

  .mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-void);
    z-index: 999;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .mobile-nav-links .nav-link {
    font-size: 1.5rem;
  }
}

/* Footer Section */
footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-hero-2);
  padding: 5rem 0 3rem;
  margin-top: 5rem;
  color: var(--color-text-inv);
}

footer p {
  color: rgba(255, 255, 255, 0.65);
}

footer h4,
footer a {
  color: white;
}

footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--accent-1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
  color: white;
}

.logo-icon {
  width: 40px;
  height: 40px;
  color: var(--primary);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: white;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  margin-bottom: 0;
}

.footer-bottom .flex {
  display: flex;
  gap: 1.5rem;
}

/* =========================================
   REFACTORED UTILITIES & SECTIONS
   ========================================= */

/* Hero Section Updates */
.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
}

.hero-title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.2;
}

.hero-desc {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.7;
}

.hero-btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Who We Are Section */
.section-who-we-are {
  background: var(--bg-light);
  padding: 8rem 0;
  position: relative;
  z-index: 10;
}

.who-we-are-grid {
  gap: 5rem;
  align-items: center;
}

.section-label {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  color: var(--text-dark-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
}

.section-headline {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 0;
  color: var(--text-dark);
}

.text-gradient-1 {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-2 {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.who-we-are-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.feature-item {
  display: flex;
  gap: 1.5rem;
}

.feature-icon-box {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(28, 27, 34, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 27, 34, 0.02);
  flex-shrink: 0;
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.feature-title {
  font-size: 1.15rem;
  color: var(--text-dark);
  margin: 0;
  font-weight: 600;
}

.feature-arrow {
  font-size: 1rem;
  color: var(--text-dark-muted);
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--text-dark-muted);
  line-height: 1.6;
  margin: 0;
}

/* Stats Section Enhancements */
.stat-icon {
  font-size: 2.5rem;
  color: var(--accent-1);
  margin-bottom: 1rem;
  display: block;
}

/* Theme Utilities */
.section-dark {
  background: #141124; /* Muted deep space background */
  color: var(--color-text-inv);
  position: relative;
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--color-text-inv);
}

.section-dark .text-muted {
  color: rgba(255, 255, 255, 0.7);
}

/* Premium dark glass card */
.card-glass-dark {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  color: white;
}

.card-glass-dark h3,
.card-glass-dark .feature-title {
  color: white;
}

.card-glass-dark p {
  color: rgba(255, 255, 255, 0.7);
}

.card-glass-dark:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

/* Timeline updates for dark mode */
.section-dark .timeline::before {
  background: rgba(255, 255, 255, 0.15);
}

.section-dark .timeline-date {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
}

/* Tag utility */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(91, 127, 255, 0.08);
  color: var(--accent-1);
  border: 1px solid rgba(91, 127, 255, 0.15);
  border-radius: 2rem;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Form inputs & structure (moved from contact.html inline styles for premium reuse) */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--text-sm);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--border-light);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: var(--text-base);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #F8F9FA;
  color: var(--color-text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.12);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-icon {
  background: #F5F4F0;
  border: 1px solid var(--border-light);
  color: var(--primary);
  width: 46px;
  height: 46px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Contact page specific layouts */
.contact-layout-grid {
  gap: 4rem;
  align-items: start;
}

.card h2 {
  margin-bottom: 1.5rem;
  font-size: var(--text-2xl);
}

.success-message {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-icon-wrapper .material-symbols-outlined {
  font-size: 40px;
}

/* Footer elements helper */
footer h4 {
  margin-bottom: 1.5rem;
}

footer .logo {
  margin-bottom: 1rem;
}

footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

/* Helper Utilities */
.text-center {
  text-align: center !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.w-full {
  width: 100% !important;
}

.flex {
  display: flex !important;
}

.items-center {
  align-items: center !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-4 {
  gap: 1rem !important;
}

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

/* Margins */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-12 { margin-bottom: 3rem !important; }
.mb-16 { margin-bottom: 4rem !important; }
.font-semibold { font-weight: 600 !important; }

.section-light-alt {
  background: var(--bg-light-alt) !important;
  color: var(--color-text) !important;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3.5rem;
}

.card-desc {
  font-size: var(--text-sm) !important;
  margin-bottom: 0 !important;
  line-height: 1.6 !important;
}