/* ============================================================
   Precision Architect — Custom Styles
   ============================================================ */

/* ─── Icon Rendering ─── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.icon-fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Tonal Surface Helpers ─── */
.glass-effect    { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tonal-layer-1   { background-color: #f8f9fa; }
.tonal-layer-2   { background-color: #edeeef; }
.tonal-layer-3   { background-color: #e7e8e9; }
.ambient-shadow  { box-shadow: 0px 24px 48px rgba(0, 27, 61, 0.06); }

/* ══════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
══════════════════════════════════════════════════════════ */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, #1b6d24, #3e5f92, #1b6d24);
  background-size: 200% auto;
  animation: gradient-slide 3s linear infinite;
  z-index: 9999;
  transition: width 0.08s linear;
}
@keyframes gradient-slide {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ══════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════ */
.header-scrolled {
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 2px 24px rgba(0, 25, 57, 0.12) !important;
}

/* ─── Nav Links ─── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: #1b6d24;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}
.nav-link.is-active::after,
.nav-link:hover::after { width: 100%; }
.nav-link.is-active { color: #001939 !important; }

/* ══════════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
══════════════════════════════════════════════════════════ */
.animate-hidden {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-hidden.animate-slide-left  { transform: translateX(-40px); }
.animate-hidden.animate-slide-right { transform: translateX(40px); }
.animate-hidden.animate-scale-up    { transform: scale(0.92) translateY(12px); }
.animate-hidden.is-visible {
  opacity: 1 !important;
  transform: none !important;
}
.animate-stagger-1 { transition-delay: 0.08s !important; }
.animate-stagger-2 { transition-delay: 0.18s !important; }
.animate-stagger-3 { transition-delay: 0.28s !important; }
.animate-stagger-4 { transition-delay: 0.38s !important; }

/* ══════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════ */

/* Floating background orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 1;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(27,109,36,0.18) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation: orb-float-1 10s ease-in-out infinite;
}
.hero-orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(62,95,146,0.15) 0%, transparent 70%);
  bottom: 10%; left: -80px;
  animation: orb-float-2 13s ease-in-out infinite;
}
.hero-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  top: 40%; right: 15%;
  animation: orb-float-3 8s ease-in-out infinite;
}
@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-30px, 20px) scale(1.05); }
  66%       { transform: translate(20px, -30px) scale(0.97); }
}
@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(40px, -40px) scale(1.08); }
}
@keyframes orb-float-3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(-20px, 20px); }
}

/* Subtle float on hero text block */
.hero-content-float {
  animation: hero-float 7s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════
   HERO ENTRANCE ANIMATIONS (.hero-a1 – .hero-a6)
══════════════════════════════════════════════════════════ */
@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
/* Left column — slides in from left, staggered */
.hero-a1 { animation: fadeSlideLeft 0.7s cubic-bezier(0.4,0,0.2,1) 0.05s both; }
.hero-a2 { animation: fadeSlideLeft 0.8s cubic-bezier(0.4,0,0.2,1) 0.18s both; }
.hero-a3 { animation: fadeSlideLeft 0.8s cubic-bezier(0.4,0,0.2,1) 0.32s both; }
.hero-a4 { animation: fadeUpIn      0.7s cubic-bezier(0.4,0,0.2,1) 0.46s both; }
/* Right column / floating card */
.hero-a5 { animation: fadeUpIn      0.7s cubic-bezier(0.4,0,0.2,1) 0.58s both; }
.hero-a6 { animation: fadeUpIn      0.9s cubic-bezier(0.4,0,0.2,1) 0.30s both; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Animated gradient label text (section labels like "Our Expertise") */
.label-gradient {
  background: linear-gradient(90deg, #1b6d24, #3e5f92, #1b6d24);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-slide 4s linear infinite;
}

/* Trust badge hover spring-up */
.trust-badge {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}
.trust-badge:hover { transform: translateY(-6px); }

/* ══════════════════════════════════════════════════════════
   BUTTONS — Ripple + Magnetic
══════════════════════════════════════════════════════════ */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple-expand 0.6s linear forwards;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* CTA Button — pulse ring */
.btn-pulse {
  position: relative;
}
.btn-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(27, 109, 36, 0.5);
  animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════
   SERVICE CARDS
══════════════════════════════════════════════════════════ */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  position: relative;
  overflow: hidden;
}
/* Dynamic shine overlay */
.tilt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.2) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}
.tilt-card:hover::before { opacity: 1; }

/* Floating z-layer for inner content */
.tilt-card-inner {
  transform: translateZ(18px);
  position: relative;
  z-index: 2;
}

/* Service card icon — bounce up on hover */
.service-icon {
  display: block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.3s ease;
}
.tilt-card:hover .service-icon {
  transform: translateY(-10px) scale(1.2) rotate(-5deg);
}

/* "Learn More" arrow slide */
.learn-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s ease, color 0.2s ease;
}
.learn-more-btn:hover { gap: 10px; }
.learn-more-btn .arrow-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.learn-more-btn:hover .arrow-icon { transform: translateX(4px); }

/* ══════════════════════════════════════════════════════════
   PROCESS STEPS
══════════════════════════════════════════════════════════ */
.step-number {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease;
}
.process-step:hover .step-number {
  transform: scale(1.15) rotate(-6deg);
  background-color: #1b6d24;
  box-shadow: 0 8px 24px rgba(27, 109, 36, 0.35);
}
.process-step {
  transition: transform 0.3s ease;
}
.process-step:hover { transform: translateY(-6px); }

/* ══════════════════════════════════════════════════════════
   WHY CHOOSE US — Benefit Rows
══════════════════════════════════════════════════════════ */
.benefit-row {
  transition: transform 0.25s ease,
              box-shadow 0.25s ease,
              background-color 0.25s ease;
}
.benefit-row:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 24px rgba(0, 25, 57, 0.09);
  background-color: #fff !important;
}
.benefit-icon {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.benefit-row:hover .benefit-icon { transform: rotate(12deg) scale(1.15); }

/* Image hover zoom */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: 1rem;
}
.img-zoom-wrap img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.img-zoom-wrap:hover img { transform: scale(1.06); }

/* ══════════════════════════════════════════════════════════
   STATS / PORTFOLIO — Shimmer + Hover
══════════════════════════════════════════════════════════ */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.07),
    transparent
  );
  animation: shimmer-pass 4s ease infinite;
  pointer-events: none;
}
@keyframes shimmer-pass {
  0%   { left: -100%; }
  50%, 100% { left: 200%; }
}
.stat-number {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.stat-card:hover .stat-number { transform: scale(1.08); }

/* ══════════════════════════════════════════════════════════
   TESTIMONIALS
══════════════════════════════════════════════════════════ */
.testimonial-card {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
/* Border glow + lift handled by tilt-card, extra glow override: */
.tilt-card.testimonial-card:hover {
  box-shadow: 0 0 0 2px rgba(27, 109, 36, 0.4),
              0 24px 48px rgba(27, 109, 36, 0.12) !important;
}
/* Star bounce on hover */
.star-row span {
  display: inline-block;
  transition: transform 0.2s ease;
}
.testimonial-card:hover .star-row span:nth-child(1) { animation: star-pop 0.4s ease 0.00s both; }
.testimonial-card:hover .star-row span:nth-child(2) { animation: star-pop 0.4s ease 0.06s both; }
.testimonial-card:hover .star-row span:nth-child(3) { animation: star-pop 0.4s ease 0.12s both; }
.testimonial-card:hover .star-row span:nth-child(4) { animation: star-pop 0.4s ease 0.18s both; }
.testimonial-card:hover .star-row span:nth-child(5) { animation: star-pop 0.4s ease 0.24s both; }
@keyframes star-pop {
  0%   { transform: scale(1) rotate(0deg); }
  40%  { transform: scale(1.5) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ══════════════════════════════════════════════════════════
   CTA SECTION
══════════════════════════════════════════════════════════ */
/* Animated mesh gradient orbs (CSS only) */
.cta-orb-1 {
  animation: orb-float-1 9s ease-in-out infinite;
}
.cta-orb-2 {
  animation: orb-float-2 12s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════
   CONTACT — Info Links
══════════════════════════════════════════════════════════ */
.contact-link .contact-icon-wrap {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s ease;
}
.contact-link:hover .contact-icon-wrap {
  transform: scale(1.15) rotate(-8deg);
  background-color: rgba(27, 109, 36, 0.2);
}

/* ══════════════════════════════════════════════════════════
   FOOTER LINKS — Arrow Reveal
══════════════════════════════════════════════════════════ */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  transition: color 0.2s ease, gap 0.25s ease;
}
.footer-link .footer-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.7rem;
  line-height: 1;
}
.footer-link:hover { gap: 4px; }
.footer-link:hover .footer-arrow { opacity: 1; transform: translateX(0); }

/* ══════════════════════════════════════════════════════════
   CUSTOM CURSOR GLOW
══════════════════════════════════════════════════════════ */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 320px; height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(27, 109, 36, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  transition: opacity 0.4s ease;
}

/* ══════════════════════════════════════════════════════════
   MOBILE NAVIGATION DRAWER
══════════════════════════════════════════════════════════ */
.mobile-nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 90vw);
  background: #ffffff;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 25, 57, 0.18);
  display: flex;
  flex-direction: column;
}
.mobile-nav-drawer.is-open { transform: translateX(0); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-nav-overlay.is-open { opacity: 1; pointer-events: all; }

/* ══════════════════════════════════════════════════════════
   FORM — Validation + States
══════════════════════════════════════════════════════════ */
.field-error {
  border: 1.5px solid #ba1a1a !important;
  background-color: #fff8f8 !important;
  outline: none !important;
}
.field-error-msg {
  display: block;
  color: #ba1a1a;
  font-size: 0.72rem;
  margin-top: 5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.field-error-msg.hidden { display: none; }

/* Input focus lift */
.form-input {
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.form-input:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(27, 109, 36, 0.12);
}

.form-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  min-height: 420px;
}

.btn-loading {
  opacity: 0.65 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #001939;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 25, 57, 0.25);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  max-width: 340px;
}
.toast.toast-success { border-left: 4px solid #1b6d24; }
.toast.toast-error   { border-left: 4px solid #ba1a1a; }
.toast.toast-info    { border-left: 4px solid #3e5f92; }
.toast.is-visible    { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════════════════════════════════
   PROCESS CONNECTOR LINE
══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .process-grid { position: relative; }
  .process-grid::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(16.66% + 32px);
    right: calc(16.66% + 32px);
    height: 2px;
    background: linear-gradient(to right, #1b6d24, #001939);
    opacity: 0.2;
  }
}

/* ══════════════════════════════════════════════════════════
   TESTIMONIAL QUOTE MARK
══════════════════════════════════════════════════════════ */
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 12px; left: 20px;
  font-size: 5rem;
  line-height: 1;
  color: #1b6d24;
  opacity: 0.10;
  font-family: Georgia, serif;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   FOCUS + ACCESSIBILITY
══════════════════════════════════════════════════════════ */
*:focus-visible {
  outline: 2px solid #1b6d24;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════
   PARALLAX
══════════════════════════════════════════════════════════ */
.parallax-bg {
  will-change: transform;
  transform-origin: center center;
}

/* ══════════════════════════════════════════════════════════
   SPINNER
══════════════════════════════════════════════════════════ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* ══════════════════════════════════════════════════════════
   REDUCED MOTION OVERRIDES
══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .cursor-glow { display: none; }
}
