/* ============================================
   COMPONENTS.CSS - Consolidated UI Components
   Single source of truth for all reusable components
   ============================================ */

/* Import footer styles */
/* Global Footer Styles - Single Source of Truth */
.footer {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, .08);
  padding: 48px 0 32px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(640px, 2fr);
  grid-template-areas: "brand nav" "cta cta";
  gap: 48px 80px;
  align-items: start;
  width: 100%;
}

.footer-brand {
  grid-area: brand;
  text-align: left;
}

.footer-logo {
  display: inline-block;
  font-weight: 900;
  font-size: 2rem;
  color: var(--gray-900);
  text-decoration: none;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: color 0.2s ease;
}

.footer-logo:hover {
  color: var(--primary);
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  max-width: 280px;
  margin: 0 0 1rem;
}

.brand-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.contact-email {
  color: var(--gray-900);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

.contact-email::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--primary);
  transition: width 0.2s ease;
}

.contact-email:hover {
  color: var(--primary);
}

.contact-email:hover::after {
  width: 100%;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  color: var(--gray-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-100);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  border: none;
}

.social-icons a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.footer-nav-sections {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 64px;
}

.footer-nav-section h4 {
  color: var(--gray-900);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0 0 .75rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: -0.01em;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-cta {
  grid-area: cta;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.footer-bottom p {
  font-size: .8rem;
  color: var(--gray-600);
  margin: 0;
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 0 24px;
    margin-top: 60px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    grid-template-areas: "brand" "nav" "cta";
    gap: 32px;
    text-align: left;
    /* Strict left align for all footer content */
  }

  .footer-brand {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-logo {
    margin: 0 0 0.5rem 0;
    justify-content: flex-start;
    display: flex;
  }

  .footer-tagline {
    margin: 0 0 1.5rem 0;
    text-align: left;
  }

  .brand-contact {
    align-items: flex-start;
  }

  .footer-nav-sections {
    grid-template-columns: 1fr;
    /* Stack vertically */
    gap: 40px;
    /* Increase gap for clarity */
    text-align: left;
  }

  .footer-nav-section h4 {
    margin-bottom: 1.5rem;
    /* More breathing room */
  }

  .footer-cta {
    justify-content: flex-start;
    /* Left align CTA */
    padding-top: 1rem;
  }

  .footer-bottom p {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Import framework components */
/*
  Frameworks UI Styles
  Implements visual patterns for: BLUF, KPI/ROI callouts, 5 Whys, Weighted Decision Matrix,
  What? So What? Now What?, and Before/After tables.

  Usage: Add semantic wrappers and small utility classes to surface decision logic explicitly.
*/

:root {
  --fw-primary: var(--primary);
  --fw-secondary: var(--secondary);
  --fw-accent: var(--accent);
  --fw-gray-900: var(--gray-900);
  --fw-gray-800: var(--gray-800);
  --fw-gray-700: var(--gray-700);
  --fw-gray-600: var(--gray-600);
  --fw-gray-200: var(--gray-200);
  --fw-gray-100: var(--gray-100);
  --fw-white: var(--white);
  --fw-radius: 12px;
}

.framework-block {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--fw-radius);
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(var(--scrim-rgb), .06)
}

.framework-title {
  margin: 0 0 .5rem;
  font-weight: 800;
  color: var(--fw-gray-900);
  font-size: 1.05rem
}

.framework-note {
  margin: .35rem 0 0;
  color: var(--fw-gray-600);
  font-size: .85rem
}

/* BLUF */
.bluf {
  position: relative;
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-1) 60%);
  border: 1px solid rgba(var(--primary-rgb), .30);
  border-radius: 10px;
  padding: 0.85rem 0.95rem 0.95rem 0.95rem;
  margin: 0 0 .5rem
}

.bluf::before {
  content: "BLUF";
  position: absolute;
  top: -11px;
  left: 16px;
  background: linear-gradient(135deg, var(--fw-primary), var(--fw-secondary));
  color: #fff;
  font-weight: 900;
  letter-spacing: .05em;
  border-radius: 999px;
  padding: .28rem .6rem;
  font-size: .7rem;
  box-shadow: 0 6px 18px rgba(var(--primary-rgb), .25)
}

.bluf p {
  margin: 0;
  color: var(--fw-gray-800);
  line-height: 1.5
}

/* KPI/ROI table */
.kpi-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-1)
}

.kpi-table th,
.kpi-table td {
  padding: .6rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200)
}

.kpi-table thead th {
  background: var(--surface-2);
  font-weight: 800;
  color: var(--gray-900)
}

.kpi-table tbody tr:nth-child(odd) {
  background: var(--surface-2)
}

.kpi-table .kpi-good {
  color: var(--success-700);
  font-weight: 800
}

/* Responsive table wrapper to prevent horizontal overflow on mobile */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

.table-wrap>table {
  min-width: 600px
}

/* 5 Whys */
.five-whys {
  display: grid;
  gap: .5rem
}

.five-whys .why {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem
}

.five-whys .why .n {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--fw-primary);
  font-weight: 800;
  font-size: .85rem
}

.five-whys .why .t {
  color: var(--fw-gray-800)
}

.five-whys .why.winner {
  border-left: 3px solid var(--fw-accent);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .08), var(--surface-1))
}

/* Weighted Decision Matrix */
.decision-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-1)
}

.decision-matrix th,
.decision-matrix td {
  padding: .6rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  font-size: .95rem
}

.decision-matrix thead th {
  background: linear-gradient(90deg, var(--surface-3), var(--surface-1));
  color: var(--gray-900);
  font-weight: 800
}

.decision-matrix tfoot td {
  background: var(--surface-2);
  font-weight: 800
}

.decision-matrix .winner {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .08), var(--surface-1));
  border-left: 3px solid var(--fw-accent)
}

/* What? So What? Now What? */
.wsn {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem
}

.wsn .box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem
}

.wsn .box h4 {
  margin: .1rem 0 .35rem;
  font-weight: 800;
  font-size: 1rem
}

@media (max-width: 768px) {
  .wsn {
    grid-template-columns: 1fr
  }
}

/* Before / After */
.before-after {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem
}

.before-after .col {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem
}

.before-after h4 {
  margin: .1rem 0 .35rem;
  font-weight: 800;
  font-size: 1rem
}

@media (max-width: 768px) {
  .before-after {
    grid-template-columns: 1fr
  }
}

/* Small utility row of example chips */
.framework-chips {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .5rem 0
}

.framework-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--fw-gray-800);
  font-weight: 700;
  font-size: .8rem
}

.framework-chips .chip i {
  color: var(--fw-primary)
}

/* Import mobile menu */
/* 
 * Enterprise Mobile Menu - Unified Component
 * Ensures consistent mobile menu behavior across all pages
 * Premium enterprise styling for $100k-$5M MRR clients
 */

/* Mobile Menu Button */
/* Premium Mobile Menu Button (Pill Style) */
.mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  /* Light gray pill */
  border: 1px solid var(--border);
  color: var(--gray-900);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 8px 16px;
  /* Pill shape padding */
  border-radius: 9999px;
  /* Pill shape */
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  background: white !important;
  /* Force high contrast white background */
}

.mobile-menu-btn .btn-text {
  display: inline-block;
  line-height: 1;
  color: #0F172A !important;
  /* Ensure dark text on white button */
}

.mobile-menu-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  /* Accent color for icon */
  margin-left: 2px;
}

.mobile-menu-btn:hover {
  background: #FFFFFF;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  /* Soft lift */
}

.mobile-menu-btn:active {
  transform: translateY(0);
}

/* Mobile Menu Overlay */
/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
  /* Warmer, deep slate gradient */
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.mobile-menu-overlay.open,
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Mobile Menu Content */
.mobile-menu-content {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
  gap: 28px;
  background: transparent;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.open .mobile-menu-content,
.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  background: rgba(var(--white-rgb), 0.08);
  border: 1px solid rgba(var(--white-rgb), 0.16);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(var(--white-rgb), 0.95);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.mobile-menu-close:hover {
  background: rgba(var(--white-rgb), 0.14);
  border-color: rgba(var(--white-rgb), 0.28);
  transform: translateY(-1px);
  color: var(--text-inverse);
}

/* Mobile Navigation */
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Keep centered, but text will be left-aligned within */
  gap: 2rem;
  /* More breathing room */
  margin-top: 0;
  width: 100%;
  padding-left: 0;
}

.mobile-nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  /* Softer white */
  text-decoration: none;
  font-size: 2.5rem;
  font-weight: 800;
  padding: 0;
  letter-spacing: -0.04em;
  line-height: 1.1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-self: center;
  text-align: center;
  /* Still center for impact */
  margin-left: 0;
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.25s ease;
}

.mobile-nav-link:hover {
  color: #818CF8;
  /* Warmer Indigo accent on hover */
  transform: scale(1.05);
  /* Gentle 'inviting' scale */
}

.mobile-nav-link:hover::after {
  width: 100%;
}

/* Featured Mobile CTA - "Top Firm" Style */
.mobile-nav-link.cta {
  margin-top: 3rem;
  /* Breathing room above button */
  background: #FFFFFF;
  /* High contrast white button */
  color: #0F172A !important;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  width: auto;
  min-width: 220px;
  text-align: center;
  box-shadow: 0 10px 30px -5px rgba(255, 255, 255, 0.2);
  /* Glowing lift */
  letter-spacing: 0.02em;
  border: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-left: 0 !important;
  align-self: center !important;
  z-index: 9999;
  /* Ensure strictly clickable */
  position: relative;
}

.mobile-nav-link.cta i {
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.2);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-link.cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.6);
  filter: brightness(1.1);
}

.mobile-nav-link i {
  font-size: 16px;
  opacity: 0.8;
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav {
    display: none !important;
  }

  .btn-cta {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-menu-overlay {
    display: none !important;
  }

  .mobile-menu-btn {
    display: none !important;
  }
}

/* Improved Touch Targets */
@media (max-width: 768px) {
  .mobile-nav-link {
    min-height: 56px;
    font-size: 18px;
  }

  .mobile-menu-close {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}

/* Animation States */
.mobile-nav-link {
  opacity: 0;
  transform: translateY(8px);
  animation: menuFadeUp 0.35s ease-out forwards;
}

.mobile-nav-link:nth-child(1) {
  animation-delay: 0.06s;
}

.mobile-nav-link:nth-child(2) {
  animation-delay: 0.12s;
}

.mobile-nav-link:nth-child(3) {
  animation-delay: 0.18s;
}

.mobile-nav-link:nth-child(4) {
  animation-delay: 0.24s;
}

@keyframes menuFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus States for Accessibility */
.mobile-menu-btn:focus,
.mobile-menu-close:focus,
.mobile-nav-link:focus {
  outline: 2px solid var(--focus-outline);
  outline-offset: 2px;
}

/* ============================================
   BUTTONS
   Standardized button styles extracted from Hero
   ============================================ */

.btn-primary,
button.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 60px rgba(79, 70, 229, 0.4);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  color: var(--gray-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}