/* =====================================================
   HOME — PREMIUM MOTION LAYER
   Loaded on the homepage only (index.php). Everything here
   is progressive: without JS or with reduced motion the page
   looks like the standard version.
   ===================================================== */

/* ---------- Scroll progress bar ---------- */
.home-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #06b6d4, #0ea5e9, #6366f1);
  pointer-events: none;
}

/* Soft aurora glow behind the slider */
.hero-media { position: relative; }
.hero-media::before {
  content: '';
  position: absolute;
  inset: -12% -10%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(40% 45% at 35% 40%, rgba(6, 182, 212, 0.28), transparent 70%),
    radial-gradient(40% 45% at 70% 65%, rgba(99, 102, 241, 0.18), transparent 70%);
  filter: blur(30px);
  animation: home-aurora 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes home-aurora {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 3%, 0) scale(1.08); }
}

/* ---------- Hero headline entrance ---------- */
.js .hero-title .hl,
.js .hero-eyebrow,
.js .hero-sub,
.js .hero-actions,
.js .hero-media {
  animation: home-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-title .hl { display: inline-block; }
.js .hero-eyebrow           { animation-delay: 0.05s; }
.js .hero-title .hl:nth-of-type(1) { animation-delay: 0.12s; }
.js .hero-title .hl:nth-of-type(2) { animation-delay: 0.22s; }
.js .hero-title .hl:nth-of-type(3) { animation-delay: 0.32s; }
.js .hero-sub               { animation-delay: 0.42s; }
.js .hero-actions           { animation-delay: 0.52s; }
.js .hero-media             { animation: home-rise-media 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }

/* Wait for the one-time intro overlay before playing the entrance */
.js:not(.intro-seen) .hero-title .hl,
.js:not(.intro-seen) .hero-eyebrow,
.js:not(.intro-seen) .hero-sub,
.js:not(.intro-seen) .hero-actions,
.js:not(.intro-seen) .hero-media { animation-delay: 1.1s; }

@keyframes home-rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes home-rise-media {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* Animated gradient on the key word */
.hero-title .text-gradient {
  background-image: linear-gradient(110deg, #06b6d4 0%, #0ea5e9 30%, #6366f1 50%, #0ea5e9 70%, #06b6d4 100%);
  background-size: 220% 100%;
  animation: home-sheen 6s ease-in-out infinite;
}
@keyframes home-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- Slider: 3D tilt ---------- */
.hero-media { perspective: 1200px; }
.hero-auto-slider {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
  will-change: transform;
}
.hero-auto-slider.is-tilting { transition: transform 0.12s linear, box-shadow 0.3s ease; }
.hero-auto-slider:hover { box-shadow: 0 35px 60px -18px rgba(14, 165, 233, 0.35); }
/* gentle zoom on the active photo */
.slide-item.active img { animation: home-kenburns 7s ease-out both; }
@keyframes home-kenburns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* ---------- Primary button: light sweep ---------- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover::after { transform: translateX(120%); }

/* ---------- Brand strip: infinite logo marquee ---------- */
.brand-strip-viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.brand-strip-viewport .brand-strip-logos {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  gap: 0;
  padding: 0.5rem 0;
  animation: home-logos 30s linear infinite;
}
/* margin (not gap) keeps both halves exactly equal, so the loop never jumps */
.brand-strip-viewport .brand-strip-logos img { margin-right: 4rem; }
.brand-strip-logos img[data-brand="Microsoft"],
.brand-strip-logos img[data-brand="Lenovo"],
.brand-strip-logos img[data-brand="Logitech"] { height: 29px; }
.brand-strip-logos img[data-brand="Hewlett Packard Enterprise"] { height: 42px; }
.brand-strip-logos img[data-brand="Huawei"] { height: 38px; }
.brand-strip-viewport:hover .brand-strip-logos { animation-play-state: paused; }
.brand-strip-logos img {
  transition: transform 0.3s ease;
}
.brand-strip-logos img:hover { transform: scale(1.06); }
@keyframes home-logos {
  to { transform: translateX(-50%); }
}

/* ---------- Spotlight cards (cursor-follow glow) ---------- */
.value-card,
.reason-card {
  position: relative;
  isolation: isolate;
}
.value-card::after,
.reason-card::after,
.sm-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(14, 165, 233, 0.14), transparent 60%);
}
.sm-card::after {
  z-index: 0;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 189, 248, 0.22), transparent 60%);
}
.sm-card > *:not(.sm-card-bar) { position: relative; z-index: 1; }
.sm-card > .sm-card-bar { z-index: 1; }
.value-card:hover::after,
.reason-card:hover::after,
.sm-card:hover::after { opacity: 1; }

.value-card,
.reason-card { transition-property: opacity, transform, box-shadow, border-color, background; }
.value-card:hover,
.reason-card:hover { border-color: rgba(14, 165, 233, 0.35); }
.js .value-card.in-view:hover,
.js .reason-card.in-view:hover { transform: translateY(-4px); }

/* Icon pop on hover */
.value-icon,
.reason-icon { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease; }
.value-card:hover .value-icon,
.reason-card:hover .reason-icon { transform: scale(1.1) rotate(-6deg); }

/* ---------- Stats ---------- */
.stat-value { font-variant-numeric: tabular-nums; }
.stat-item { position: relative; }
.stat-item::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  margin: 0.9rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.stat-item.in-view::after { width: 2.5rem; }

/* ---------- Core values banner: slow parallax drift ---------- */
.core-values-banner { background-size: 120%; background-position: center var(--parallax, 50%); }
.core-value-item { transition: transform 0.3s ease, color 0.3s ease; }
.core-value-item:hover { transform: translateX(4px); }

/* ---------- Client cards: lift + colour ---------- */
.showcase-logo-box img { filter: grayscale(0.6); transition: filter 0.3s ease, transform 0.25s ease; }
a.showcase-client-card:hover .showcase-logo-box img { filter: none; }

/* ---------- Floating WhatsApp: gentle entrance ---------- */
.js .whatsapp-float { animation: home-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s both; }
@keyframes home-pop {
  from { opacity: 0; transform: scale(0.4) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Reduced motion: switch it all off ---------- */
@media (prefers-reduced-motion: reduce) {
  .home-progress { display: none; }
  .hero-media::before,
  .hero-title .text-gradient,
  .slide-item.active img,
  .brand-strip-viewport .brand-strip-logos,
  .js .hero-title .hl, .js .hero-eyebrow, .js .hero-sub, .js .hero-actions, .js .hero-media,
  .js .whatsapp-float { animation: none !important; }
  .brand-strip-viewport .brand-strip-logos { flex-wrap: wrap; justify-content: center; width: auto; gap: 1.5rem 2.5rem; }
  .brand-strip-viewport .brand-strip-logos img { margin-right: 0; }
  .brand-strip-viewport { -webkit-mask-image: none; mask-image: none; }
  .brand-strip-logos [aria-hidden="true"] { display: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .brand-strip-viewport .brand-strip-logos { animation-duration: 22s; }
  .brand-strip-viewport .brand-strip-logos img { margin-right: 2.5rem; }
  .hero-media::before { inset: -6%; }
  .core-values-banner { background-size: cover; }
}
