/* ================================================
   GEOMETRIC AGENCY — ANIMATIONS CSS
   v3.1 — Fixed Badge Shimmer + Services 2-Row Grid
   ================================================ */

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════
   1. BADGE — Hero Guarantee (Glassmorphism + Shimmer)
   ════════════════════════════════════════════════ */

.hero-guarantee {
  position: relative;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 9px 18px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(34,211,238,0.22) !important;
  overflow: hidden;
  width: auto !important;
  margin: 0 auto !important;
}

.hero-guarantee .guarantee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

.hero-guarantee .guarantee-text {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3;
}

/* Shimmer border — slow rotating gradient with pause */
@keyframes badge-border-shimmer {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 50%; }
  55%  { background-position: 100% 50%; }
  80%  { background-position: 0% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-guarantee::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: linear-gradient(
    130deg,
    transparent 0%,
    rgba(34,211,238,0.0) 40%,
    rgba(34,211,238,0.6) 48%,
    rgba(255,255,255,0.55) 50%,
    rgba(34,211,238,0.6) 52%,
    rgba(34,211,238,0.0) 60%,
    transparent 100%
  );
  background-size: 300% 300%;
  animation: badge-border-shimmer 7s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

/* Inner shine sweep — narrow beam, pass fast then pause ~3s */
@keyframes badge-shine {
  0%   { transform: translateX(-150%) skewX(-20deg); opacity: 0; }
  8%   { opacity: 1; }
  30%  { transform: translateX(300%) skewX(-20deg); opacity: 0; }
  100% { transform: translateX(300%) skewX(-20deg); opacity: 0; }
}

.hero-guarantee::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 18%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.20),
    transparent
  );
  animation: badge-shine 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* ════════════════════════════════════════════════
   2. NAVBAR — Glassmorphism
   ════════════════════════════════════════════════ */

.navbar {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background: rgba(10,15,26,0.55) !important;
  border-bottom: 1px solid rgba(34,211,238,0.10) !important;
}

/* ════════════════════════════════════════════════
   3. PQE CARDS — Glassmorphism
   ════════════════════════════════════════════════ */

.pqe-card {
  position: relative;
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(34,211,238,0.15) !important;
  border-radius: 18px !important;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}

.pqe-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 50px rgba(34,211,238,0.10), 0 0 0 1px rgba(34,211,238,0.20) !important;
}

@keyframes pqe-shine {
  0%   { transform: translateX(-150%) skewX(-20deg); }
  100% { transform: translateX(300%) skewX(-20deg); }
}

.pqe-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: translateX(-150%) skewX(-20deg);
  pointer-events: none;
  z-index: 1;
}

.pqe-card:hover::after {
  animation: pqe-shine 0.8s ease forwards;
}

.pqe-cards-grid {
  gap: 20px;
}

/* ════════════════════════════════════════════════
   4. TRANSFORMATION CARDS — Animated entrance + glow
   ════════════════════════════════════════════════ */

.comparison-row {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.comparison-row.in-view {
  opacity: 1;
  transform: translateY(0);
}

.comparison-row:nth-child(1) { transition-delay: 0s; }
.comparison-row:nth-child(2) { transition-delay: 0.12s; }
.comparison-row:nth-child(3) { transition-delay: 0.24s; }
.comparison-row:nth-child(4) { transition-delay: 0.36s; }

.card.card-from {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
  background: rgba(239,68,68,0.06) !important;
  border: 1px solid rgba(239,68,68,0.20) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.comparison-row.in-view .card.card-from {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.05s;
}

.card.card-to {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
  background: rgba(34,211,238,0.05) !important;
  border: 1px solid rgba(34,211,238,0.22) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.comparison-row.in-view .card.card-to {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.15s;
}

.card.card-to:hover {
  box-shadow: 0 8px 32px rgba(34,211,238,0.18), 0 0 0 1px rgba(34,211,238,0.3) !important;
  transform: translateY(-3px);
}

.card.card-from:hover {
  box-shadow: 0 8px 32px rgba(239,68,68,0.15), 0 0 0 1px rgba(239,68,68,0.25) !important;
  transform: translateY(-3px);
}

/* ════════════════════════════════════════════════
   5. SERVICES — Horizontal Scroll (sticky) + 2-Row Grid
   ════════════════════════════════════════════════ */

.services {
  position: relative;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.services-scroll-outer {
  position: relative;
}

.services-scroll-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  gap: 24px;
}

.services-scroll-track {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 18px;
  will-change: transform;
  padding: 0 40px;
  align-items: stretch;
}

/* ── Service card redesign ── */
.service-card {
  position: relative;
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(34,211,238,0.12) !important;
  border-radius: 20px !important;
  padding: 24px 22px !important;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  cursor: default;
  width: 280px;
  box-sizing: border-box;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.5), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: radial-gradient(ellipse at 50% 100%, rgba(34,211,238,0.06), transparent 70%);
  pointer-events: none;
}

.service-card-number {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(34,211,238,0.35);
  font-family: 'Sora', sans-serif;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
  border-color: rgba(34,211,238,0.30) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(34,211,238,0.20) !important;
}

.service-icon-box {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  background: rgba(34,211,238,0.08) !important;
  border: 1px solid rgba(34,211,238,0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 14px !important;
  transition: background 0.3s ease, box-shadow 0.3s ease !important;
  flex-shrink: 0 !important;
}

.service-card:hover .service-icon-box {
  background: rgba(34,211,238,0.14) !important;
  box-shadow: 0 0 20px rgba(34,211,238,0.15) !important;
}

.service-card h3 {
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  margin-bottom: 8px !important;
  color: #e8f4f8 !important;
  line-height: 1.35 !important;
}

.service-card p {
  font-size: 0.82rem !important;
  color: rgba(232,244,248,0.60) !important;
  line-height: 1.6 !important;
  flex: 1;
}

/* Section header and CTA inside sticky */
.services-scroll-sticky .section-header {
  text-align: center;
  flex-shrink: 0;
}

.services-scroll-sticky .section-cta-center {
  flex-shrink: 0;
}

/* Mobile: disable horizontal scroll, restore normal layout */
@media (max-width: 768px) {
  .services {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  .services-scroll-outer {
    height: auto !important;
  }
  .services-scroll-sticky {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
    gap: 0 !important;
  }
  .services-scroll-track {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    padding: 16px 0 !important;
    transform: none !important;
    height: auto !important;
    gap: 16px !important;
    grid-template-rows: none !important;
  }
  .service-card {
    width: 100% !important;
  }
}

/* ════════════════════════════════════════════════
   6. TESTIMONIALS — Card effects + Number glow
   ════════════════════════════════════════════════ */

.testi-result-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.35s ease !important;
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(34,211,238,0.15) !important;
  border-radius: 16px !important;
  padding: 24px 20px !important;
}

.testi-result-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

.testi-result-item:nth-child(1) { transition-delay: 0s; }
.testi-result-item:nth-child(2) { transition-delay: 0.1s; }
.testi-result-item:nth-child(3) { transition-delay: 0.2s; }

.testi-result-item:hover {
  box-shadow: 0 12px 40px rgba(34,211,238,0.12), 0 0 0 1px rgba(34,211,238,0.22) !important;
  transform: translateY(-4px) !important;
}

@keyframes num-glow-pulse {
  0%, 100% {
    text-shadow: 0 0 8px rgba(34,211,238,0.4), 0 0 20px rgba(34,211,238,0.2);
    color: rgba(34,211,238,1);
  }
  50% {
    text-shadow: 0 0 16px rgba(34,211,238,0.8), 0 0 40px rgba(34,211,238,0.4), 0 0 60px rgba(34,211,238,0.15);
    color: rgba(180,255,255,1);
  }
}

.tri-num {
  animation: num-glow-pulse 2.5s ease-in-out infinite;
}

.testi-result-item:nth-child(2) .tri-num { animation-delay: 0.4s; }
.testi-result-item:nth-child(3) .tri-num { animation-delay: 0.8s; }

.tc {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.35s ease;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.tc.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tc:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(34,211,238,0.18) !important;
  transform: translateY(-4px) scale(1.01) !important;
}

.trow-2-1 .tc:nth-child(1) { transition-delay: 0s; }
.trow-2-1 .tc:nth-child(2) { transition-delay: 0.12s; }
.trow-3   .tc:nth-child(1) { transition-delay: 0.06s; }
.trow-3   .tc:nth-child(2) { transition-delay: 0.18s; }
.trow-3   .tc:nth-child(3) { transition-delay: 0.30s; }

/* ════════════════════════════════════════════════
   7. SCROLL ANIMATION CLASSES
   ════════════════════════════════════════════════ */

.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim-fade-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim-fade-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

.anim-scale-up {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim-scale-up.in-view {
  opacity: 1;
  transform: scale(1);
}

.anim-stagger > *:nth-child(1) { transition-delay: 0s; }
.anim-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.anim-stagger > *:nth-child(3) { transition-delay: 0.24s; }
.anim-stagger > *:nth-child(4) { transition-delay: 0.36s; }
.anim-stagger > *:nth-child(5) { transition-delay: 0.48s; }
.anim-stagger > *:nth-child(6) { transition-delay: 0.60s; }

/* ════════════════════════════════════════════════
   8. CURSOR GLOW
   ════════════════════════════════════════════════ */

.cursor-glow {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.055) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: left, top;
}

@media (max-width: 768px) {
  .cursor-glow { display: none; }
}

/* ════════════════════════════════════════════════
   9. BUTTON SHINE
   ════════════════════════════════════════════════ */

@keyframes btn-shine {
  0%   { transform: translateX(-200%) skewX(-20deg); }
  100% { transform: translateX(400%) skewX(-20deg); }
}

.btn-primary, .cta-button, button[class*="btn"] {
  position: relative;
  overflow: hidden;
}

.btn-primary::after, .cta-button::after, button[class*="btn"]::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-200%) skewX(-20deg);
  pointer-events: none;
}

.btn-primary:hover::after, .cta-button:hover::after, button[class*="btn"]:hover::after {
  animation: btn-shine 0.7s ease forwards;
}

/* ════════════════════════════════════════════════
   10. HERO ENTRANCE
   ════════════════════════════════════════════════ */

.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
}

.hero-ready .hero-content > *:nth-child(1) {
  animation: hero-item-in 0.7s ease forwards 0.1s;
}
.hero-ready .hero-content > *:nth-child(2) {
  animation: hero-item-in 0.7s ease forwards 0.25s;
}
.hero-ready .hero-content > *:nth-child(3) {
  animation: hero-item-in 0.7s ease forwards 0.4s;
}
.hero-ready .hero-content > *:nth-child(4) {
  animation: hero-item-in 0.7s ease forwards 0.55s;
}
.hero-ready .hero-content > *:nth-child(5) {
  animation: hero-item-in 0.7s ease forwards 0.7s;
}

@keyframes hero-item-in {
  to { opacity: 1; transform: translateY(0); }
}
