/* ============================================================
   TRANSITIONS.CSS — Luxury Page Transitions
   ============================================================ */

/* Overlay that slides in/out on page change */
.page-trans-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  overflow: hidden;
}

/* Four-panel wipe */
.page-trans-panel {
  flex: 1;
  background: linear-gradient(135deg, #0066FF 0%, #7C3AED 100%);
  transform: scaleY(0);
  transform-origin: bottom;
}
.page-trans-panel:nth-child(1) { transition-delay: 0ms; }
.page-trans-panel:nth-child(2) { transition-delay: 40ms; }
.page-trans-panel:nth-child(3) { transition-delay: 80ms; }
.page-trans-panel:nth-child(4) { transition-delay: 120ms; }

.page-trans-overlay.in .page-trans-panel {
  transform: scaleY(1);
  transition: transform 0.5s cubic-bezier(0.77,0,0.18,1);
}
.page-trans-overlay.out .page-trans-panel {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(0.77,0,0.18,1);
}

/* Logo during transition */
.page-trans-logo {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.page-trans-overlay.in  ~ .page-trans-logo { opacity: 1; }
.page-trans-overlay.out ~ .page-trans-logo { opacity: 0; }
.page-trans-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
}

/* ============================================================
   MICROINTERACTIONS.CSS — Button, Input, Card Effects
   ============================================================ */

/* ---- Magnetic Button Effect ---- */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275) !important;
  display: inline-flex !important;
}

/* ---- Button shine sweep ---- */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.18),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.btn:hover::before { left: 150%; }

/* ---- Focus ring on all interactive elements ---- */
:focus-visible {
  outline: 2px solid rgba(0,102,255,0.60);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Input glow on focus ---- */
.form-input:focus {
  animation: inputGlow 0.4s ease forwards;
}
@keyframes inputGlow {
  from { box-shadow: 0 0 0 0 rgba(0,102,255,0); }
  to   { box-shadow: 0 0 0 4px rgba(0,102,255,0.15); }
}

/* ---- Link underline draw ---- */
.footer-links a,
.nav-link {
  position: relative;
}

/* ---- Card lift on hover ---- */
.service-card,
.testimonial-card,
.stat-card,
.team-card,
.value-card,
.portfolio-card,
.why-card,
.contact-info-item {
  will-change: transform;
}

/* ---- Number counter flip ---- */
@keyframes flipCount {
  0%   { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
.stat-number.updating { animation: flipCount 0.3s ease; }

/* ---- Scroll progress bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0066FF, #7C3AED, #10B981);
  z-index: 10001;
  transition: width 0.1s linear;
  border-radius: 0 9999px 9999px 0;
}

/* ---- Section reveal underline ---- */
.section-title .gradient-text {
  position: relative;
}
.section-title .gradient-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg,#0066FF,#7C3AED);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.22,1,0.36,1);
}
.section-title.in-view .gradient-text::after { width: 100%; }

/* ---- Floating label smooth ---- */
.form-label {
  will-change: transform;
  backface-visibility: hidden;
}

/* ---- Hover glow card ---- */
.service-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,102,255,0.20), rgba(124,58,237,0.15));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.service-card:hover::after { opacity: 1; }

/* ---- Stagger children animation ---- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}
.stagger-children.animated > *:nth-child(1) { animation: staggerIn 0.5s ease 0.05s forwards; }
.stagger-children.animated > *:nth-child(2) { animation: staggerIn 0.5s ease 0.10s forwards; }
.stagger-children.animated > *:nth-child(3) { animation: staggerIn 0.5s ease 0.15s forwards; }
.stagger-children.animated > *:nth-child(4) { animation: staggerIn 0.5s ease 0.20s forwards; }
.stagger-children.animated > *:nth-child(5) { animation: staggerIn 0.5s ease 0.25s forwards; }
.stagger-children.animated > *:nth-child(6) { animation: staggerIn 0.5s ease 0.30s forwards; }
@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Toast notification ---- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.toast {
  padding: 0.75rem 1.5rem;
  background: rgba(22,22,30,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.90);
  box-shadow: 0 8px 32px rgba(0,0,0,0.30);
  animation: toastIn 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  white-space: nowrap;
}
.toast.success { border-color: rgba(16,185,129,0.40); }
.toast.error   { border-color: rgba(239,68,68,0.40); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .btn::before, .page-trans-panel { transition: none; }
  .stagger-children > * { animation: none; opacity: 1; transform: none; }
}
