/* ==========================================================================
   DELEGATE ERP — Home / Hero Section Stylesheet
   Theme: DelegatePortal Green (#374C31, #16a34a, #22c55e, #4ade80, #86efac)
   ========================================================================== */

.hero-section {
  position: relative;
  padding-top: calc(var(--utility-height) + var(--header-height) + 14px);
  padding-bottom: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 28%, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0) 46%),
    radial-gradient(circle at 18% 18%, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0) 42%),
    linear-gradient(180deg, #f3fbf6 0%, #e9f7ee 58%, #f7fcf9 100%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(55, 76, 49, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 76, 49, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 40%, transparent 100%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 clamp(16px, 2.5vw, 36px);
}

/* Main 2-Column Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.12fr);
  align-items: start;
  gap: 28px;
}

/* ==========================================================================
   Left Column: Copy, Brush Underline, Features, Square CTAs
   ========================================================================== */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 4px;
  animation: heroFadeUp 700ms var(--ease-smooth) both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-kicker {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.08rem, 1.6vw, 1.42rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--brand-forest);
  line-height: 1.25;
  margin-bottom: 2px;
}

.hero-title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 2.65vw, 2.45rem);
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.02em;
  color: #1c2c1a;
  line-height: 1.12;
  margin-bottom: 4px;
}

.hero-title-highlight {
  display: block;
  white-space: nowrap;
  font-family: "Sora", sans-serif;
  font-style: normal;
  font-weight: 800;
  font-size: clamp(1.25rem, 2.05vw, 1.98rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-top: 2px;
  color: var(--brand-primary);
  background: linear-gradient(120deg, #15803d 0%, #22c55e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-right: 4px;
}

.hero-brush-underline {
  width: clamp(200px, 25vw, 290px);
  height: 14px;
  margin: 0 0 12px;
  overflow: visible;
}

.hero-brush-underline path {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: drawBrush 1.1s var(--ease-smooth) 240ms forwards;
}

@keyframes drawBrush {
  to {
    stroke-dashoffset: 0;
  }
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.08vw, 1rem);
  font-weight: 600;
  line-height: 1.45;
  color: #243323;
  max-width: 500px;
  margin-bottom: 12px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.87rem;
  font-weight: 500;
  color: #324431;
}

.feature-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-check svg {
  width: 12px;
  height: 12px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  background-image: linear-gradient(115deg, #22c55e 0%, #16a34a 48%, #2f5429 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 26px -6px rgba(22, 163, 74, 0.5);
  transition:
    background-position 420ms var(--ease-smooth),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.hero-btn-primary svg {
  width: 15px;
  height: 15px;
  transition: transform var(--transition-fast);
}

.hero-btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(22, 163, 74, 0.58);
}

.hero-btn-primary:hover svg {
  transform: translateX(3px);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  border: 1.5px solid rgba(55, 76, 49, 0.34);
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-forest);
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition:
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.hero-btn-secondary svg {
  width: 18px;
  height: 18px;
  color: var(--brand-primary);
}

.hero-btn-secondary:hover {
  border-color: var(--brand-secondary);
  background-color: #ffffff;
  color: var(--brand-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   Right Column: Professional Dual-Device (MacBook + Mobile) Auto-Slider
   ========================================================================== */
.hero-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  animation: heroFadeUp 760ms var(--ease-smooth) 120ms both;
}

/* ==========================================================================
   Prominent Modern Active Department Heading Bar (Above Laptop Mockup)
   ========================================================================== */
.stage-heading-bar {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 4px;
}

.stage-heading-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.stage-dept-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 60%, #273822 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px -6px rgba(22, 163, 74, 0.5);
}

.stage-dept-icon svg {
  width: 19px;
  height: 19px;
}

.stage-heading-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.stage-eyebrow-sep {
  opacity: 0.45;
}

.stage-dept-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #1c2d1b;
  line-height: 1.15;
  animation: deptTitleSlide 360ms var(--ease-smooth);
}

@keyframes deptTitleSlide {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Dual Hardware Stage */
.devices-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: 0;
  perspective: 1200px;
}

.devices-glow {
  position: absolute;
  inset: 4% 4% 6% 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 60% 42%, rgba(74, 222, 128, 0.32) 0%, rgba(34, 197, 94, 0.1) 48%, transparent 72%),
    radial-gradient(circle at 22% 72%, rgba(55, 76, 49, 0.18) 0%, transparent 55%);
  filter: blur(38px);
  pointer-events: none;
  z-index: 0;
}

.stage-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #ffffff;
  border: 1.5px solid rgba(55, 76, 49, 0.2);
  color: var(--brand-forest);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(20, 42, 18, 0.14);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.stage-expand-btn svg {
  width: 14px;
  height: 14px;
  color: var(--brand-primary);
  transition: color 200ms ease;
}

.stage-expand-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.stage-expand-btn:hover svg {
  color: #ffffff;
}

/* ==========================================================================
   Real Transparent-Screen PNG Hardware Stage (1586 x 992) + Subtle 3D Motion
   ========================================================================== */
.png-mockup-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1586 / 992;
  z-index: 2;
  user-select: none;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 280ms var(--ease-smooth);
  animation: hardwareBreath 6.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes hardwareBreath {
  0%, 100% {
    translate: 0 0px;
  }
  50% {
    translate: 0 -6px;
  }
}

.devices-stage:hover .png-mockup-stage {
  animation-play-state: paused;
}

.mockup-frame-png {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 26px 38px rgba(18, 42, 16, 0.22));
}

/* Perspective-mapped screen slots sitting behind the transparent PNG cutouts */
.screen-slot {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  overflow: hidden;
  background: #f4f7f8;
  will-change: transform;
}

.screen-slot--laptop {
  z-index: 2;
  width: 860px;
  height: 590px;
}

.screen-slot--mobile {
  z-index: 3;
  width: 248px;
  height: 540px;
  border-radius: 26px;
}

/* ==========================================================================
   Shared Auto-Slider Transitions (Silky Crossfade + Full Dashboard Fit)
   ========================================================================== */
.screen-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.screen-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 520ms var(--ease-smooth), transform 520ms var(--ease-smooth);
  pointer-events: none;
}

.screen-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

.screen-slide img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.screen-slot--mobile .screen-slide img {
  object-fit: fill;
  padding-top: 0;
}

/* Auto-slide progress bar along bottom edge of Laptop screen */
.screen-timer-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(55, 76, 49, 0.16);
  z-index: 7;
}

.screen-timer-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-mint));
}

/* ==========================================================================
   Slider Controls (Full-Width Caption + Dots & Prev/Next Arrows)
   ========================================================================== */
.hero-slider-controls {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.slider-counter {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--brand-forest);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}

.slider-caption {
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-main);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.slider-right-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

/* ==========================================================================
   Full-HD Dashboard Lightbox Modal
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(16, 30, 15, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--ease-smooth), visibility 280ms var(--ease-smooth);
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-dialog {
  width: 100%;
  max-width: 1180px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.25);
  box-shadow: 0 32px 72px -12px rgba(0, 0, 0, 0.45);
  transform: scale(0.96);
  transition: transform 280ms var(--ease-smooth);
}

.lightbox-overlay.is-open .lightbox-dialog {
  transform: scale(1);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #273822;
  color: #ffffff;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lightbox-header h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
}

.lightbox-header .modal-close-btn {
  position: static;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lightbox-header .modal-close-btn:hover {
  background: var(--brand-primary);
  color: #ffffff;
}

.lightbox-body {
  padding: 18px;
  background: #f1f7f3;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: center;
  max-height: 78vh;
  overflow-y: auto;
}

.lightbox-img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(55, 76, 49, 0.14);
  box-shadow: 0 12px 28px -10px rgba(18, 42, 16, 0.2);
  display: block;
}

@media (max-width: 820px) {
  .lightbox-body {
    grid-template-columns: 1fr;
  }

  .lightbox-img--mobile {
    max-width: 240px;
    margin: 0 auto;
  }
}

.slider-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: rgba(55, 76, 49, 0.2);
  transition: width 280ms var(--ease-smooth), background-color 280ms var(--ease-smooth);
}

.slider-dot.is-active {
  width: 24px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-mint));
}

.slider-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffffff;
  border: 1.5px solid rgba(55, 76, 49, 0.16);
  color: var(--brand-forest);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(24, 52, 22, 0.08);
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.slider-arrow-btn svg {
  width: 16px;
  height: 16px;
}

.slider-arrow-btn:hover {
  border-color: var(--brand-secondary);
  background-color: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ==========================================================================
   Bottom Floating Stats Bar (Clean White Elevated Strip — Reference Style)
   ========================================================================== */
.hero-stats-bar {
  margin-top: 20px;
  background: #ffffff;
  border: 1px solid rgba(55, 76, 49, 0.06);
  border-radius: 22px;
  padding: 20px 32px;
  box-shadow:
    0 20px 44px -12px rgba(24, 52, 22, 0.12),
    0 4px 12px -4px rgba(24, 52, 22, 0.05);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 220ms var(--ease-smooth);
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  color: #15803d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 220ms var(--ease-smooth), color 220ms ease;
}

.stat-item:hover .stat-icon {
  transform: scale(1.1);
  color: var(--brand-secondary);
}

.stat-icon svg {
  width: 30px;
  height: 30px;
}

.stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.stat-number {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.42rem;
  font-weight: 800;
  color: #15803d;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #546355;
  margin-top: 2px;
}

/* ==========================================================================
   Floating WhatsApp Quick Button (Bottom Right — Circle with Pulse Blink)
   ========================================================================== */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #16a34a 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px -6px rgba(22, 163, 74, 0.55);
  animation: whatsappPulseBlink 1.9s ease-in-out infinite;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.75);
  pointer-events: none;
  animation: whatsappRingRipple 1.9s ease-out infinite;
}

@keyframes whatsappPulseBlink {
  0%, 100% {
    box-shadow:
      0 10px 24px -6px rgba(22, 163, 74, 0.52),
      0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  50% {
    box-shadow:
      0 12px 28px -4px rgba(22, 163, 74, 0.72),
      0 0 0 10px rgba(37, 211, 102, 0);
  }
}

@keyframes whatsappRingRipple {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

.whatsapp-fab svg {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
}

.whatsapp-fab:hover {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 16px 32px -6px rgba(22, 163, 74, 0.68);
}

.whatsapp-fab:hover::before {
  animation-play-state: paused;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab,
  .whatsapp-fab::before {
    animation: none;
  }
}

/* ==========================================================================
   Responsive Hero Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-features {
    align-items: flex-start;
    text-align: left;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-stats-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 12px;
  }

  .stat-item:nth-child(3)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-section {
    padding-top: calc(var(--utility-height) + var(--header-height) + 22px);
    padding-bottom: 40px;
  }

  .devices-stage {
    padding: 8px 0 4px;
  }

  .live-sync-pill {
    font-size: 0.66rem;
    padding: 4px 9px;
    right: 4px;
    top: 0;
  }

  .showcase-tabs {
    padding: 10px;
    gap: 8px;
  }

  .pipeline-row {
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .pipeline-row::-webkit-scrollbar {
    display: none;
  }

  .tab-connector {
    min-width: 14px;
  }

  .showcase-tab {
    font-size: 0.69rem;
    padding: 5px 8px;
  }

  .hero-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 18px 16px;
    gap: 16px 10px;
  }

  .stat-item::after {
    display: none;
  }

  .stat-item {
    justify-content: flex-start;
  }
}
