/* Premium Motion & Effects for Urbance */

/* === FLOATING SERVICE ICONS (Living Icons) === */
.floating-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-icon {
  position: absolute;
  width: 64px;
  height: 64px;
  font-size: 32px;
  display: grid;
  place-items: center;
  opacity: 0.15;
  filter: blur(0.5px);
  will-change: transform;
  animation: float-drift 20s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 30%; right: 8%; animation-delay: -3s; }
.floating-icon:nth-child(3) { top: 55%; left: 3%; animation-delay: -6s; }
.floating-icon:nth-child(4) { bottom: 20%; right: 5%; animation-delay: -9s; }
.floating-icon:nth-child(5) { top: 75%; left: 10%; animation-delay: -12s; }
.floating-icon:nth-child(6) { top: 45%; right: 12%; animation-delay: -15s; }

@keyframes float-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(8px, -12px) rotate(2deg); }
  50% { transform: translate(-6px, 8px) rotate(-1deg); }
  75% { transform: translate(10px, 6px) rotate(1deg); }
}

/* Task micro-animations */
.floating-icon.cleaning { animation: float-drift 18s ease-in-out infinite, sparkle 4s ease-in-out infinite; }
.floating-icon.handyman { animation: float-drift 22s ease-in-out infinite, tool-bounce 3s ease-in-out infinite; }

@keyframes sparkle {
  0%, 100% { filter: blur(0.5px) brightness(1); }
  50% { filter: blur(0.3px) brightness(1.3); }
}

@keyframes tool-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* === GEL GLASS SEARCH === */
.gel-search {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(26, 115, 232, 0.2);
  border-radius: 24px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(26, 115, 232, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.gel-search:focus-within {
  border-color: rgba(26, 115, 232, 0.4);
  box-shadow: 0 12px 48px rgba(26, 115, 232, 0.18), 0 0 0 4px rgba(26, 115, 232, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 12px 48px rgba(26, 115, 232, 0.18), 0 0 0 4px rgba(26, 115, 232, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
  50% { box-shadow: 0 12px 48px rgba(26, 115, 232, 0.24), 0 0 0 4px rgba(26, 115, 232, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
}

.gel-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 18px;
  color: var(--navy);
}

.gel-search input::placeholder {
  color: rgba(10, 26, 47, 0.5);
}

/* === LIQUID SHEEN BUTTONS === */
.btn-liquid {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-liquid::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.btn-liquid:hover::before {
  left: 100%;
}

.btn-liquid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 115, 232, 0.25);
}

.btn-liquid:active {
  transform: translateY(0) scale(0.98);
}

/* Ripple effect on click */
.btn-liquid::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
  z-index: 0;
}

.btn-liquid:active::after {
  width: 200px;
  height: 200px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0.3s ease;
}

/* === TRUST STRIP === */
.trust-strip {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: #4FC3F7;
}

/* === BLUR-TO-SHARP REVEAL === */
.blur-reveal {
  animation: blur-to-sharp 0.8s ease-out forwards;
  opacity: 0;
}

@keyframes blur-to-sharp {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.blur-reveal-delay-1 { animation-delay: 0.1s; }
.blur-reveal-delay-2 { animation-delay: 0.2s; }
.blur-reveal-delay-3 { animation-delay: 0.3s; }
.blur-reveal-delay-4 { animation-delay: 0.4s; }

/* === SPOTLIGHT CURSOR (Desktop only) === */
@media (pointer: fine) {
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(79, 195, 247, 0.08), transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  body.spotlight-active::before {
    opacity: 1;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .floating-icon,
  .btn-liquid::before,
  .gel-search,
  .blur-reveal {
    animation: none !important;
    transition: none !important;
  }

  .btn-liquid:hover {
    transform: none;
  }
}

/* === HOW IT WORKS SCROLL STORY === */
.how-it-works-story {
  padding: 100px 0;
  background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
}

.story-steps {
  display: grid;
  gap: 80px;
  max-width: 900px;
  margin: 0 auto;
}

.story-step {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.story-step[data-step="2"] {
  grid-template-columns: 1fr 200px;
}

.story-step[data-step="2"] .step-visual {
  order: 2;
}

.step-visual {
  display: grid;
  place-items: center;
}

.step-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(79, 195, 247, 0.15));
  backdrop-filter: blur(20px);
  border-radius: 30px;
  display: grid;
  place-items: center;
  font-size: 48px;
  box-shadow: 0 20px 60px rgba(26, 115, 232, 0.15);
  transition: transform 0.4s ease;
}

.story-step:hover .step-icon {
  transform: scale(1.05) rotate(2deg);
}

.step-content {
  position: relative;
}

.step-number {
  font-size: 72px;
  font-weight: 800;
  color: rgba(26, 115, 232, 0.08);
  position: absolute;
  top: -40px;
  left: 0;
  line-height: 1;
}

.step-content h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--navy);
}

.step-content p {
  font-size: 18px;
  line-height: 1.6;
  color: #6A6A6A;
}

/* === METRICS COUNTER SECTION === */
.metrics-section {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.03), rgba(79, 195, 247, 0.05));
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.metric-card {
  text-align: center;
  padding: 32px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(26, 115, 232, 0.1);
  box-shadow: 0 8px 32px rgba(26, 115, 232, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26, 115, 232, 0.15);
}

.metric-number {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #1A73E8, #4FC3F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.2;
}

.metric-label {
  font-size: 16px;
  color: #6A6A6A;
  font-weight: 500;
}

/* === CATEGORY CHIPS === */
.category-chips {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.chip {
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(26, 115, 232, 0.2);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(79, 195, 247, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chip:hover::before {
  opacity: 1;
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.15);
  border-color: rgba(26, 115, 232, 0.4);
}

.chip.active {
  background: linear-gradient(135deg, #1A73E8, #4FC3F7);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.3);
}

.chip.active::before {
  display: none;
}

/* Service card spring animation */
.service-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.service-card.filtering-out {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.service-card.filtering-in {
  animation: spring-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spring-in {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  50% {
    transform: scale(1.02) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== Reviews Ticker ===== */
.reviews-ticker-section {
  padding: 60px 0;
  background: linear-gradient(90deg, rgba(26, 115, 232, 0.03) 0%, rgba(79, 195, 247, 0.05) 50%, rgba(26, 115, 232, 0.03) 100%);
  overflow: hidden;
  position: relative;
}

.reviews-ticker-wrapper {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}

.reviews-ticker {
  display: flex;
  gap: 24px;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}

.reviews-ticker:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.review-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 24px;
  min-width: 320px;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.review-stars {
  color: #FFB800;
  font-size: 18px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.review-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--navy);
  margin-bottom: 12px;
  font-style: italic;
}

.review-author {
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}

/* ===== Before/After Slider ===== */
.before-after-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 100%);
}

.before-after-slider {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.before-after-container {
  position: relative;
  width: 100%;
  height: 550px;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
}

.before-image,
.after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.before-image {
  z-index: 1;
  background: linear-gradient(135deg, #8B8B8B 0%, #BDBDBD 100%);
}

.after-image {
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
  transition: clip-path 0.05s ease-out;
  background: linear-gradient(135deg, #1A73E8 0%, #4FC3F7 100%);
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: white;
  z-index: 3;
  cursor: col-resize;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: var(--blue);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}

.slider-button:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

.slider-button:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 12px 40px rgba(26, 115, 232, 0.3);
  background: linear-gradient(135deg, #1A73E8 0%, #4FC3F7 100%);
  color: white;
}

.slider-labels {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 4;
  pointer-events: none;
}

.label-before,
.label-after {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ===== Partner Dashboard Preview ===== */
.partner-preview-section {
  padding: 100px 0;
}

.dashboard-preview {
  max-width: 1000px;
  margin: 0 auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1A73E8, #4FC3F7, #B39DFF);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.period-badge {
  background: rgba(26, 115, 232, 0.1);
  color: var(--blue);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.earnings-amount,
.bookings-count,
.rating-score {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #1A73E8, #4FC3F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.2;
}

.earnings-trend {
  color: #22C55E;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.bookings-breakdown {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.booking-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.rating-stars {
  color: #FFB800;
  font-size: 24px;
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.rating-reviews {
  font-size: 13px;
  color: var(--gray);
}

#earningsChart {
  margin-top: 16px;
  width: 100%;
  height: auto;
  max-height: 120px;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
  .floating-icons {
    display: none;
  }

  .gel-search {
    backdrop-filter: blur(12px);
  }

  .trust-strip {
    gap: 16px;
  }

  .trust-item {
    font-size: 13px;
  }

  .story-steps {
    gap: 60px;
  }

  .story-step {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .story-step[data-step="2"] .step-visual {
    order: 1;
  }

  .step-icon {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .step-number {
    font-size: 56px;
    top: -30px;
  }

  .step-content h3 {
    font-size: 24px;
  }

  .metric-number {
    font-size: 42px;
  }

  .category-chips {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .chip {
    white-space: nowrap;
  }

  .before-after-container {
    height: 400px;
  }

  .slider-labels {
    top: 20px;
    padding: 0 20px;
  }

  .label-before,
  .label-after {
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .slider-button {
    width: 48px;
    height: 48px;
  }

  .slider-button svg {
    width: 20px;
    height: 20px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .earnings-amount,
  .bookings-count,
  .rating-score {
    font-size: 36px;
  }

  .reviews-ticker {
    animation-duration: 30s;
  }

  .review-card {
    min-width: 280px;
    max-width: 280px;
  }
}
