html {
  font-size: 14px;
  scroll-behavior: smooth;
}

/* Brighten navbar background */
header.glass-effect {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ============================================
   NAVBAR POLISH
   ============================================ */

/* Navbar scroll shadow effect */
header.fixed {
  transition: box-shadow 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Active nav link styling */
.navlinks a.active {
  color: hsl(210, 90%, 48%) !important;
  position: relative;
}

.navlinks a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, hsl(210, 90%, 48%), hsl(35, 95%, 58%));
  border-radius: 1px;
}

/* Nav link hover effect */
.navlinks a {
  position: relative;
  transition: color 0.25s ease;
}

.navlinks a:not(.active)::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: hsl(210, 90%, 48%);
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}

.navlinks a:not(.active):hover::after {
  width: 100%;
  left: 0;
}

/* ============================================
   BUTTON POLISH
   ============================================ */

/* Primary CTA buttons */
a button,
button[data-testid^="button-"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  letter-spacing: 0.01em;
}

/* Gradient CTA button glow effect */
.bg-gradient-to-r.from-primary.to-secondary {
  position: relative;
  overflow: hidden;
}

.bg-gradient-to-r.from-primary.to-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.bg-gradient-to-r.from-primary.to-secondary:hover::before {
  left: 100%;
}

/* ============================================
   HERO SECTION POLISH
   ============================================ */

/* Floating card animations */
.cardbottom,
.cardtop {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.cardbottom:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.15) !important;
}

.cardtop:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.15) !important;
}

/* Hero stat counter subtle pulse */
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ============================================
   FEATURE CARDS POLISH
   ============================================ */

/* Better feature card hover */
.modern-card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, hsl(210, 90%, 48%), hsl(35, 95%, 58%));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.modern-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 40px -8px hsl(210, 90%, 48% / .15), 0 4px 16px -2px hsl(27, 85%, 55% / .1) !important;
}

/* Feature image overlay polish */
.modern-card .h-48 img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Stats cards on homepage */
section .bg-white.rounded-2xl.shadow-lg,
section .bg-white.rounded-2xl.shadow-md {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

section .bg-white.rounded-2xl.shadow-lg:hover,
section .bg-white.rounded-2xl.shadow-md:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.12);
}

/* ============================================
   FAQ SECTION POLISH
   ============================================ */

/* FAQ button styling */
[data-testid^="faq-button"] {
  transition: all 0.25s ease;
  padding: 4px 0;
}

[data-testid^="faq-button"]:hover h3 {
  color: hsl(210, 90%, 48%);
}

[data-testid^="faq-button"] svg {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease !important;
}

/* FAQ answer animation */
.faq-answer {
  animation: faqSlideDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes faqSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 2000px;
  }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

/* Fade in up animation for sections */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger children animations */
@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   FOOTER POLISH
   ============================================ */

footer {
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

footer a {
  transition: color 0.25s ease, transform 0.25s ease !important;
  display: inline-block;
}

footer a:hover {
  transform: translateX(3px);
}

footer .flex.space-x-4 a {
  transition: color 0.25s ease, transform 0.3s ease !important;
}

footer .flex.space-x-4 a:hover {
  transform: translateY(-3px) !important;
}

/* Footer bottom bar */
footer .border-t {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   CONTACT FORM POLISH
   ============================================ */

/* Input focus states */
#contactForm input:focus,
#contactForm textarea:focus,
#contactForm select:focus {
  border-color: hsl(210, 90%, 48%) !important;
  box-shadow: 0 0 0 3px hsl(210, 90%, 48% / .12) !important;
  outline: none !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#contactForm input,
#contactForm textarea,
#contactForm select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Form labels */
#contactForm label {
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.01em;
}

/* Submit button loading state */
#submitBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ============================================
   MOBILE MENU POLISH
   ============================================ */

/* Mobile slide-in menu */
div[role="dialog"][data-state="open"] {
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

div[role="dialog"].close {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Mobile menu links */
div[role="dialog"] a {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

div[role="dialog"] a:hover {
  padding-left: 8px;
  color: hsl(210, 90%, 48%) !important;
}

/* ============================================
   PROCESS PAGE POLISH
   ============================================ */

/* Process step cards */
.bg-card.border.rounded-3xl {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-card.border.rounded-3xl:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.1);
}

/* Step number circles */
.bg-primary.text-primary-foreground.w-12.h-12.rounded-full {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-card.border.rounded-3xl:hover .bg-primary.text-primary-foreground.w-12.h-12.rounded-full {
  transform: scale(1.1);
  box-shadow: 0 4px 12px hsl(210, 90%, 48% / .3);
}

/* ============================================
   ABOUT PAGE POLISH
   ============================================ */

/* Core values cards */
.bg-muted .text-center .bg-primary.w-16.h-16 {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-muted .text-center:hover .bg-primary.w-16.h-16 {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 24px hsl(210, 90%, 48% / .3);
}

/* Trust stats cards */
.bg-primary-foreground\/10.rounded-2xl {
  transition: all 0.3s ease;
}

.bg-primary-foreground\/10.rounded-2xl:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   BENEFITS PAGE POLISH
   ============================================ */

/* Role benefit sections - image hover */
.benefits-role-img,
.rounded-3xl.w-full.object-cover {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.rounded-3xl.w-full.object-cover:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.15);
}

/* Metrics cards */
.bg-white.rounded-2xl.p-6.shadow-md {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-white.rounded-2xl.p-6.shadow-md:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.12);
}

/* ============================================
   CALCULATOR PAGE POLISH
   ============================================ */

#calcForm select,
#calcForm input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#calcForm select:focus,
#calcForm input:focus {
  border-color: hsl(210, 90%, 48%) !important;
  box-shadow: 0 0 0 3px hsl(210, 90%, 48% / .12) !important;
  outline: none;
}

/* Calculate button */
#calcForm + div button,
button:has(+ #calcForm),
.bg-primary.text-white.rounded-lg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Result sections */
.modern-card h3 svg {
  transition: transform 0.3s ease;
}

.modern-card:hover h3 svg {
  transform: rotate(10deg);
}

/* ============================================
   COMPARISON TABLE POLISH (Traditional vs Automated)
   ============================================ */

/* Comparison cards */
.bg-red-50,
.bg-green-50 {
  transition: all 0.3s ease;
}

.bg-red-50:hover,
.bg-green-50:hover {
  transform: translateX(4px);
}

/* ============================================
   SELECTION STYLING
   ============================================ */

::selection {
  background-color: hsl(210, 90%, 48% / .15);
  color: hsl(220, 15%, 8%);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(220, 15%, 95%);
}

::-webkit-scrollbar-thumb {
  background: hsl(220, 15%, 75%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(220, 15%, 60%);
}

/* ============================================
   TOAST NOTIFICATION POLISH
   ============================================ */

#toast-notification li {
  animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   LOADING/TRANSITION EFFECTS
   ============================================ */

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 1;
}

/* Link transitions globally */
a {
  transition: color 0.25s ease;
}

/* ============================================
   RESPONSIVE POLISH
   ============================================ */

@media (max-width: 768px) {
  /* Tighter spacing on mobile */
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .mb-20 {
    margin-bottom: 3rem !important;
  }

  .text-5xl {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
  }

  /* Disable hover transforms on mobile (touch) */
  .modern-card:hover {
    transform: none !important;
  }

  .bg-card.border.rounded-3xl:hover {
    transform: none;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  header, footer, .fixed {
    display: none !important;
  }

  main {
    padding-top: 0 !important;
  }
}
