/* Shared motion: content stays visible without JavaScript. */
:root { --motion-ease: cubic-bezier(0.22, 1, 0.36, 1); }
html { scroll-padding-top: 110px; }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 1100;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), #a8e9bd);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.hero-artwork {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.8;
}
.hero-artwork::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 65%, var(--light-bg));
}
.hero-content { max-width: 1140px; }
.hero h1 .hero-line1 { white-space: normal; }
.hero h1 .hero-line1:last-child { color: #238647; }
.hero p { max-width: 660px; }
.page-hero {
  background-image: linear-gradient(90deg, rgba(243,252,246,0.9), rgba(243,252,246,0.78)), url('../images/green-flow-background.jpg');
  background-size: cover;
  background-position: center 70%;
}

/* Raster artwork replaces the footer decoration and blends into the brand green. */
footer { background: var(--light-bg); }
.footer-inner { background: var(--light-bg); }
.footer-artwork { height: 160px; position: relative; overflow: hidden; }
.footer-artwork img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 82%; opacity: 0.65; }
.footer-artwork::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fff 0%, transparent 45%, var(--light-bg) 100%);
}
.brand-logo { mix-blend-mode: multiply; }

/* CSS bars replace the framework's image-based menu icon. */
.navbar-toggler-icon { background-image: none; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; }
.navbar-toggler-icon span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: transform 250ms ease, opacity 250ms ease; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.carousel-control-prev > .bi, .carousel-control-next > .bi { font-size: 25px; }

.nav-link { position: relative; }
.nav-link::before {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--motion-ease);
}
.nav-link.active::before, .nav-link:focus-visible::before { transform: scaleX(1); }
:is(a, button, input, textarea):focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 5px; }
.service-card:focus-within::after { transform: scaleX(1); }
.solutions-visual { border-radius: 20px; transition: transform 650ms var(--motion-ease), box-shadow 650ms var(--motion-ease); }
.cs-card-img img, .learn-more i, .btn-outline-c i { transition: transform 500ms var(--motion-ease); }
.service-card, .value-card, .testimonial-card { transition-timing-function: var(--motion-ease); }
.back-to-top { visibility: hidden; }
.back-to-top.visible { visibility: visible; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* A finite settling movement gives the banner depth without constant motion. */
  .hero-artwork img { animation: hero-settle 4s var(--motion-ease) both; }
  .hero::before, .hero::after { animation: glow-settle 4s var(--motion-ease) both; }
  .page-hero::before { animation: glow-settle 3s var(--motion-ease) both; }
  .tech-bubble { animation-iteration-count: 1; }
  .navbar .mega-menu.show { animation: menu-entrance 220ms var(--motion-ease); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .nav-link:hover::before { transform: scaleX(1); }
  .solutions-visual:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: 0 24px 60px rgba(28,31,58,0.1); }
  .cs-card:hover .cs-card-img img { transform: scale(1.035); }
  .learn-more:hover i, .btn-outline-c:hover i { transform: translateX(5px); }
  .feature-list li { transition: transform 350ms var(--motion-ease); }
  .feature-list li:hover { transform: translateX(4px); }
  .btn-outline-c:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(28,31,58,0.12); }
}

@keyframes hero-settle { from { transform: scale(1.07) translateY(8px); } to { transform: scale(1); } }
@keyframes glow-settle { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-entrance { from { opacity: 0; margin-top: 8px; } to { opacity: 1; margin-top: 0; } }

@media (max-width: 991px) {
  .nav-link::before { left: 4px; right: auto; width: 30px; }
  .footer-artwork { height: 110px; }
}
@media (max-width: 767px) {
  .hero-artwork img { opacity: 0.5; }
  .page-hero { background-image: linear-gradient(90deg, rgba(243,252,246,0.92), rgba(243,252,246,0.84)), url('../images/green-flow-background-768.jpg'); }
  .footer-artwork { height: 80px; }
  .scroll-progress { height: 2px; }
  html { scroll-padding-top: 85px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .service-card:hover, .value-card:hover, .blog-card:hover, .cs-card:hover,
  .testimonial-card:hover, .team-card:hover, .pricing-card:hover,
  .btn-dark-c:hover, .btn-primary-c:hover, .btn-outline-c:hover, .btn-light-c:hover,
  .service-card:hover .service-icon, .btn-dark-c:hover i, .btn-light-c:hover i,
  .footer-social-circles a:hover, .footer-links-list li a:hover::before { transform: none !important; }
}
