/* ==========================================================================
   BRIGHT PATH ABA - GLOBAL & LAYOUT STYLES
   ========================================================================== */

@import url('variables.css');

/* --------------------------------------------------------------------------
   1. RESET & BASELINES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--neutral-dark);
  background-color: var(--neutral-light);
  overflow-x: hidden;
  position: relative;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  color: var(--neutral-darkest);
  font-weight: 700;
  line-height: var(--lh-tight);
}

h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  position: relative;
}

h3 {
  font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  color: var(--neutral-dark);
  line-height: var(--lh-relaxed);
}

p.lead {
  font-size: var(--text-lg);
  color: var(--neutral-gray);
  font-weight: 400;
}

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

a:hover {
  color: var(--primary-light-alt);
}

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

/* --------------------------------------------------------------------------
   2. BUTTONS & CTAs (Apple & Material fusion)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-round);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Primary Button (Teal Gradient) */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light-alt));
  color: var(--white);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: var(--white);
}

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

/* Secondary Button (Gold/Amber) */
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--neutral-darkest);
  font-weight: 700;
  box-shadow: var(--shadow-md), var(--shadow-glow-accent);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-accent);
}

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

/* Outline Button */
.btn-outline {
  background-color: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-subtle);
  transform: translateY(-2px);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   3. STRUCTURAL WRAPPERS & UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width-site);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding: var(--space-20) 0;
  position: relative;
}

.section-alt {
  background-color: var(--white);
}

.section-primary-subtle {
  background-color: var(--primary-subtle);
}

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

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

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

.grid-4 {
  grid-template-columns: 1fr;
}

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

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

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

/* Spacing and Alignment helpers */
.text-center { text-align: center; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

/* Card Component (Apple Glassmorphism look) */
.card {
  background-color: var(--white);
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.2);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   4. NAVIGATION HEADER (Sleek Blur)
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 250, 252, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--neutral-border);
  transition: var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
  padding: var(--space-2) 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  transition: var(--transition-normal);
}

.header.scrolled .navbar {
  height: 64px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-family: var(--font-header);
  font-size: var(--text-xl);
  color: var(--neutral-darkest);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

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

.nav-menu {
  display: none;
  list-style: none;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-weight: 500;
  color: var(--neutral-dark);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition-normal);
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-cta {
  display: none;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 102;
}

.mobile-toggle span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--neutral-darkest);
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.mobile-toggle span:nth-child(1) { top: 0px; }
.mobile-toggle span:nth-child(2) { top: 10px; }
.mobile-toggle span:nth-child(3) { top: 20px; }

.mobile-toggle.open span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.mobile-toggle.open span:nth-child(3) {
  top: 10px;
  transform: rotate(-135deg);
}

/* Mobile Sidebar */
.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 360px;
  height: 100vh;
  background-color: var(--white);
  z-index: 101;
  padding: 100px var(--space-8) var(--space-8) var(--space-8);
  box-shadow: var(--shadow-xl);
  transition: var(--transition-slow);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-nav-panel.open {
  right: 0;
}

.mobile-nav-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-nav-panel .nav-link {
  font-size: var(--text-lg);
  display: block;
}

.mobile-nav-panel .btn {
  margin-top: var(--space-4);
  width: 100%;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 992px) {
  .nav-menu { display: flex; }
  .nav-cta { display: block; }
  .mobile-toggle { display: none; }
}

/* --------------------------------------------------------------------------
   5. STICKY CONTACT ACTIONS (Conversion Booster)
   -------------------------------------------------------------------------- */
/* Floating Bottom Bar (Mobile only) */
.sticky-contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--neutral-border);
  z-index: 90;
  display: flex;
  padding: var(--space-3) var(--space-4);
  gap: var(--space-3);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  transform: translateY(100%);
  transition: var(--transition-slow);
}

.sticky-contact-bar.visible {
  transform: translateY(0);
}

.sticky-contact-bar .btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
}

/* Floating Sidebar Contacts (Desktop only) */
.desktop-sticky-contact {
  display: none;
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: 89;
  flex-direction: column;
  gap: var(--space-3);
}

.desktop-sticky-contact a {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-round);
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: var(--transition-normal);
  position: relative;
}

.desktop-sticky-contact a:hover {
  transform: scale(1.1);
  background-color: var(--primary-light-alt);
}

.desktop-sticky-contact a .tooltip {
  position: absolute;
  right: 70px;
  background-color: var(--neutral-darkest);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.desktop-sticky-contact a:hover .tooltip {
  opacity: 1;
}

.desktop-sticky-contact a.accent-btn {
  background-color: var(--accent);
  color: var(--neutral-darkest);
  box-shadow: var(--shadow-lg), var(--shadow-glow-accent);
}

.desktop-sticky-contact a.accent-btn:hover {
  background-color: var(--accent-dark);
  color: var(--white);
}

@media (min-width: 768px) {
  .sticky-contact-bar { display: none !important; }
  .desktop-sticky-contact { display: flex; }
}

/* --------------------------------------------------------------------------
   6. EXIT INTENT POPUP (Lead Generation)
   -------------------------------------------------------------------------- */
.exit-intent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  padding: var(--space-4);
}

.exit-intent-overlay.active {
  opacity: 1;
  visibility: visible;
}

.exit-intent-card {
  width: 100%;
  max-width: 520px;
  background-color: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: var(--transition-slow);
  position: relative;
  border: 1px solid var(--neutral-border);
}

.exit-intent-overlay.active .exit-intent-card {
  transform: scale(1);
}

.exit-close-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--neutral-light-gray);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-round);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-gray);
  transition: var(--transition-fast);
  z-index: 10;
}

.exit-close-btn:hover {
  background-color: var(--neutral-border);
  color: var(--neutral-darkest);
}

.exit-intent-content {
  padding: var(--space-8);
}

.exit-badge {
  background-color: var(--accent-glass);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-round);
  display: inline-block;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exit-intent-content h2 {
  font-size: var(--text-3xl);
  color: var(--neutral-darkest);
  margin-bottom: var(--space-3);
}

.exit-intent-content p {
  color: var(--neutral-gray);
  margin-bottom: var(--space-6);
}

.exit-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.exit-form-group input {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-border);
  outline: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: var(--transition-fast);
}

.exit-form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glass);
}

.exit-intent-content .btn {
  width: 100%;
  margin-top: var(--space-2);
}

.exit-footer-text {
  font-size: var(--text-xs);
  color: var(--neutral-gray);
  margin-top: var(--space-4);
  text-align: center;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   7. FOOTER SECTION
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--neutral-darkest);
  color: hsl(210, 40%, 96.1%);
  padding: var(--space-16) 0 var(--space-24) 0; /* Add bottom spacing to prevent mobile sticky bar overlap */
  border-top: 4px solid var(--primary);
}

@media (min-width: 768px) {
  .footer {
    padding: var(--space-20) 0 var(--space-10) 0;
  }
}

.footer h4 {
  color: var(--white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
  position: relative;
  padding-bottom: var(--space-2);
}

.footer h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

.footer-description {
  color: hsl(215, 16%, 75%);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-6);
}

.footer-logo {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: var(--text-2xl);
  color: var(--white);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-logo span {
  color: var(--accent);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link a {
  color: hsl(215, 16%, 75%);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-link a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: hsl(215, 16%, 75%);
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--accent);
}

.footer-contact-item a {
  color: hsl(215, 16%, 75%);
}

.footer-contact-item a:hover {
  color: var(--white);
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.08);
  color: hsl(215, 16%, 60%);
  font-size: var(--text-xs);
}

.footer-legal-links {
  display: flex;
  gap: var(--space-6);
}

.footer-legal-links a {
  color: hsl(215, 16%, 60%);
}

.footer-legal-links a:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   8. COMPONENT SPECIFIC UTILITIES (Schema items, Badges)
   -------------------------------------------------------------------------- */
.badge-service {
  background-color: var(--primary-glass);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-round);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* --------------------------------------------------------------------------
   9. INTERACTIVE SCROLL ANIMATIONS (Reveal triggers)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s var(--transition-slow);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
