/* 
 * Pulicorp Corporate Landing Page Stylesheet
 * Single Source of Truth for Visual Identity: branding book.pdf
 * Fonts: Rubik (Headers), Montserrat (Body)
 * Brand Colors: Orange (#E67C2F), Grey (#DCE1E5), Navy (#103758)
 */

/* Font definitions are preconnected and loaded asynchronously in HTML head for Core Web Vitals (FCP/LCP) */

/* Color variables and theme config */
:root {
  --color-primary-orange: #E67C2F;
  --color-accent-grey: #DCE1E5;
  --color-brand-navy: #103758;
  --color-brand-navy-light: #1b4b73;
  --color-navy-dark: #07223b;
  --color-bg-light: #F7F9FF;
  --color-text-dark: #0b1118;
  --color-text-muted: #3a4a58;
  --gradient-orange: linear-gradient(135deg, #ff9e59 0%, #E67C2F 100%);
  --gradient-navy: linear-gradient(135deg, #1b4b73 0%, #103758 100%);
  --gradient-dark: linear-gradient(135deg, #103758 0%, #07223b 100%);
  --gradient-premium: linear-gradient(135deg, #103758 0%, #1b4b73 50%, #E67C2F 100%);
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Rubik', sans-serif;
}

/* Glassmorphism for Navigation */
.frosted-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 225, 229, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.frosted-nav.scrolled {
  background: rgba(16, 55, 88, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(7, 34, 59, 0.3);
}

.frosted-nav.scrolled a {
  color: rgba(255, 255, 255, 0.85);
}

.frosted-nav.scrolled a:hover {
  color: var(--color-primary-orange);
}

.frosted-nav.scrolled .logo-invert {
  filter: brightness(0) invert(1);
}

/* Custom continuous scrolling marquee for client logos */
.logo-marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.logo-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.logo-marquee-track:hover {
  animation-play-state: paused;
}

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

/* Before/After Split Image Slider */
.before-after-slider {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 40px -15px rgba(16, 55, 88, 0.2);
  width: 100%;
  aspect-ratio: 16/9;
}

.before-after-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.before-after-slider .image-before {
  z-index: 10;
}

.before-after-slider .image-after {
  z-index: 5;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-primary-orange);
  z-index: 20;
  cursor: ew-resize;
  left: 50%;
  transform: translateX(-50%);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-color: var(--color-primary-orange);
  border: 4px solid #fff;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transition: background-color 0.2s;
}

.before-after-slider:hover .slider-button {
  background-color: var(--color-brand-navy);
}

.slider-label {
  position: absolute;
  bottom: 1rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 55, 88, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.25rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.label-before {
  left: 1rem;
  z-index: 15;
}

.label-after {
  right: 1rem;
  z-index: 15;
}

/* Interactive Tabs for Sector Solutions */
.sector-tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.sector-tab-btn.active {
  border-bottom-color: var(--color-primary-orange);
  color: var(--color-brand-navy);
  font-weight: 700;
}

/* Custom transitions and hover states */
.premium-card {
  border: 1px solid var(--color-accent-grey);
  background-color: #ffffff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 10px 30px -15px rgba(16, 55, 88, 0.05);
}

.premium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 40px -20px rgba(16, 55, 88, 0.12);
  border-color: rgba(230, 124, 47, 0.3);
}

.premium-card:hover .card-icon-container {
  background: var(--gradient-orange);
  color: white;
  transform: rotate(10deg) scale(1.1);
}

.premium-card:hover .card-icon-container span {
  color: white;
}

.card-icon-container {
  transition: all 0.3s ease;
}

/* Form inputs focus state */
.premium-input {
  border: 1px solid var(--color-accent-grey);
  border-radius: 0.375rem;
  padding: 0.875rem 1rem;
  transition: all 0.3s ease;
}

.premium-input:focus {
  outline: none;
  border-color: var(--color-primary-orange);
  box-shadow: 0 0 0 3px rgba(230, 124, 47, 0.15);
}

/* Animated buttons with premium shine effects */
.btn-premium {
  position: relative;
  overflow: hidden;
  background: var(--gradient-orange);
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
  z-index: -1;
}

.btn-premium:hover {
  box-shadow: 0 10px 20px -5px rgba(230, 124, 47, 0.4);
  transform: translateY(-2px);
}

.btn-premium:hover::after {
  left: 125%;
}

.btn-premium:active {
  transform: translateY(0);
}

.btn-premium-navy {
  position: relative;
  overflow: hidden;
  background: var(--gradient-navy);
  transition: all 0.3s ease;
  z-index: 1;
}

.btn-premium-navy::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
  z-index: -1;
}

.btn-premium-navy:hover {
  box-shadow: 0 10px 20px -5px rgba(16, 55, 88, 0.4);
  transform: translateY(-2px);
}

.btn-premium-navy:hover::after {
  left: 125%;
}

/* Horizontal scrolling project photo gallery */
.gallery-marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.gallery-marquee-track {
  display: flex;
  width: max-content;
  animation: gallery-scroll 35s linear infinite;
  gap: 1.5rem;
}

.gallery-marquee-track:hover {
  animation-play-state: paused;
}

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

.gallery-card {
  width: 320px;
  height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -10px rgba(16, 55, 88, 0.15);
  cursor: pointer;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 55, 88, 0.9) 0%, rgba(16, 55, 88, 0.2) 60%, transparent 100%);
  opacity: 0.85;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  z-index: 10;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 0.95;
  background: linear-gradient(to top, rgba(230, 124, 47, 0.95) 0%, rgba(16, 55, 88, 0.3) 100%);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

/* Floating WhatsApp button widget with pulsing animation */
.whatsapp-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 49;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: widget-pulse 2s infinite;
}

.whatsapp-widget:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #20ba5a;
}

@keyframes widget-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* FAQ details custom transition styling */
details[open] summary ~ * {
  animation: faq-reveal 0.3s ease-out;
}

@keyframes faq-reveal {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

details {
  transition: all 0.3s ease;
}

details:hover {
  border-color: rgba(230, 124, 47, 0.4);
  box-shadow: 0 6px 15px -5px rgba(16, 55, 88, 0.05);
}

/* Crystall benefits interactive hover pulse effects */
.benefit-item {
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-4px);
}

.benefit-item:hover .benefit-icon {
  transform: scale(1.15);
  color: #ff9e59;
}

.benefit-icon {
  transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-light);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-orange);
}

/* Animation library placeholder overrides if prefers-reduced-motion is true */
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track, .gallery-marquee-track {
    animation: none;
    overflow-x: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }
  .premium-card:hover {
    transform: none;
  }
  .before-after-slider img {
    transition: none;
  }
  .whatsapp-widget {
    animation: none;
  }
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

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

/* Parallax Background */
.hero-parallax {
  will-change: transform;
}

/* Micro-interactions */
.premium-card:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
}

header nav a {
  position: relative;
}

header nav a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary-orange);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

header nav a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.btn-premium:hover, .btn-premium-navy:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-premium:active, .btn-premium-navy:active {
  transform: translateY(0) scale(0.98);
}
