/* =========================================================
   SUMMIT PEOPLE GROUP — SITE-WIDE ANIMATION SYSTEM
   Scroll reveals, hover polish, and load-in motion.
   Works alongside base.css / style.css / home.css / about.css /
   contact.css / showcase.css / footer.css — additive only.
   ========================================================= */


/* =========================================================
   SCROLL-REVEAL BASE
   Classes are added by js/scroll-reveal.js. If JS never runs
   (blocked, fails, disabled) elements simply stay visible —
   nothing here hides content by default.
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 0.68, 0, 1.01),
    transform 0.7s cubic-bezier(0.22, 0.68, 0, 1.01);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slightly different treatment for photography / imagery */
.reveal-img {
  opacity: 0;
  transform: translateY(22px) scale(0.95);
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.68, 0, 1.01),
    transform 0.8s cubic-bezier(0.22, 0.68, 0, 1.01);
  will-change: opacity, transform;
}

.reveal-img.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}


/* =========================================================
   HEADER — SMOOTH SCROLL SHADOW
   (main.js toggles box-shadow; this just makes it glide)
   ========================================================= */

.header {
  transition: box-shadow 0.35s ease;
}


/* =========================================================
   NAV — SLIDING UNDERLINE
   ========================================================= */

nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent-green, #c7e000);
  transition: width 0.28s ease;
}

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


/* =========================================================
   LOGO — SUBTLE LIFT
   ========================================================= */

.logo img {
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.06) rotate(-2deg);
}


/* =========================================================
   BUTTONS — SHEEN SWEEP ON HOVER
   Works for pill buttons across the site.
   ========================================================= */

.btn-primary,
.btn-secondary,
.btn-green,
.contact-form-card .btn-primary,
.feedback-card .btn-primary,
.contact-form button.btn-secondary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::before,
.btn-secondary::before,
.btn-green::before,
.contact-form-card .btn-primary::before,
.feedback-card .btn-primary::before,
.contact-form button.btn-secondary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
  z-index: 1;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-green:hover::before,
.contact-form-card .btn-primary:hover::before,
.feedback-card .btn-primary:hover::before,
.contact-form button.btn-secondary:hover::before {
  left: 125%;
}


/* =========================================================
   HERO IMAGERY — GENTLE IDLE FLOAT
   Applied to the image itself; the wrapper (.hero-image)
   carries the scroll-reveal entrance, so the two never fight
   over the transform property.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {

  .hero-image-left img {
    animation: heroFloat 6.5s ease-in-out infinite;
  }

  .hero-image-right img {
    animation: heroFloat 6.5s ease-in-out infinite;
    animation-delay: -3.2s;
  }

}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}


/* =========================================================
   CARDS — LIFT POLISH
   (transform/box-shadow hovers already exist per page;
   this adds the finishing touches that are missing)
   ========================================================= */

.trust-card,
.leadership-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trust-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 30, 61, 0.14);
}

.trust-card h3 {
  transition: color 0.25s ease;
}

.trust-card:hover h3 {
  color: var(--blue-dark, #0f1e3d);
}

/* Contact "why connect" number pops on hover */
.benefit-number {
  display: inline-block;
  transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-number {
  transform: scale(1.15);
}

/* Contact info icons */
.info-icon {
  transition: transform 0.3s ease, background 0.3s ease;
}

.info-block:hover .info-icon {
  transform: scale(1.12) rotate(-6deg);
  background: rgba(199, 224, 0, 0.22);
}


/* =========================================================
   FORM FIELDS — FOCUS GLOW
   ========================================================= */

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-green, #c7e000);
  box-shadow: 0 0 0 4px rgba(199, 224, 0, 0.18);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


/* =========================================================
   TESTIMONIAL ROTATION — CROSSFADE-IN
   Re-triggers each time JS swaps the .active class.
   ========================================================= */

.testimonial-box.active {
  animation: testimonialIn 0.6s ease forwards;
}

@keyframes testimonialIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =========================================================
   LOGO MARQUEE — PAUSE ON HOVER
   (defensive: only matters where .logo-slider is used)
   ========================================================= */

.logo-slider:hover .logo-track {
  animation-play-state: paused;
}


/* =========================================================
   ABOUT-PAGE PHOTOGRAPHY — HOVER POP
   ========================================================= */

.about-image img,
.about-what-image img,
.about-work-image img,
.about-approach-image img {
  transition: transform 0.45s cubic-bezier(0.22, 0.68, 0, 1.01),
    box-shadow 0.45s ease;
}

.about-image:hover img,
.about-what-image:hover img,
.about-work-image:hover img,
.about-approach-image:hover img {
  transform: scale(1.045);
  box-shadow: 0 26px 55px rgba(15, 30, 61, 0.22);
}


/* =========================================================
   ACCESSIBILITY — RESPECT REDUCED MOTION GLOBALLY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

}
