/* 
  Hero Section V4 Styles
  Creative Agency Aesthetic
*/

/* Precise Dashed Grid */
.grid-line {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  border-color: #e5e5e5;
}

.grid-line-v {
  width: 0;
  height: 100%;
  top: 0;
  border-left: 1px dashed #e5e5e5;
}

.grid-line-h {
  height: 0;
  width: 100%;
  left: 0;
  border-top: 1px dashed #e5e5e5;
}

/* Formix Specific Layout */
.hero-v4 {
  padding: 0;
  position: relative;
}

.hero-container {
  max-width: 100%;
  margin: 0;
  position: relative;
  width: 100%;
  height: 100vh;
}

/* Typography Reveal */
.hero-v4-text-reveal {
  line-height: 0.92;
  letter-spacing: -0.035em; /* Deep editorial spacing */
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}

.hero-v4-text-reveal span {
  display: block;
}

.hero-v4-desc {
  font-family: 'SF Pro Display', sans-serif;
}

/* Radial Glow Behind Text */
.hero-v4-left::before {
  content: "";
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 77, 77, 0.08) 0%,
    transparent 60%
  );
  top: -20%;
  left: -20%;
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

/* Magnetic Button Interaction */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hero Grid Parallax */
.hero-v4-grid {
  will-change: transform;
}

.hero-card {
  transition:
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.hero-card:hover, .hero-card.active {
  box-shadow: 0 0 25px rgba(232, 78, 27, 0.45), 0 30px 60px rgba(0, 0, 0, 0.15);
  border-color: #ef4444 !important;
}

/* Custom Noise Overlay */
.noise-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Badge Animation */
@keyframes badge-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    opacity: 1;
  }
  70% {
    transform: scale(2.2);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    opacity: 0;
  }
}

.pulse-dot::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #22c55e;
  border-radius: inherit;
  top: 0;
  left: 0;
  animation: badge-pulse 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Responsive Grid Adjustments */
@media (min-width: 1024px) {
  .hero-v4-left {
    padding-left: 20px;
  }
}

@media (max-width: 1024px) {
  .hero-v4 {
    padding-top: 160px; /* Prevent nav overlap on mobile */
  }

  .hero-v4-right {
    height: auto;
    padding: 40px 0;
  }

  .hero-v4-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero-v4-grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .hero-v4-grid::-webkit-scrollbar {
    display: none;
  }

  .hero-card {
    min-width: 260px;
    flex-shrink: 0;
  }
}

/* Typography Color-Switch Animation */
.hero-animated-word {
  display: inline-block !important;
  transform-origin: left center;
  will-change: transform, opacity;
  color: var(--word-fill);
  -webkit-text-fill-color: var(--word-fill);
  -webkit-text-stroke: 1.5px var(--word-stroke);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Video Showcase Borders */
.hero-v4-grid-inner > div {
  border: none !important;
}

.hero-v4-grid-inner > div:hover {
  border: 1px solid #ef4444 !important;
}

/* Premium SaaS CTA Button Styles */
@keyframes border-gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}



@keyframes cta-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse-icon {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4), 0 0 0 0 rgba(59, 130, 246, 0.3);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 12px 4px rgba(139, 92, 246, 0.2), 0 0 20px 8px rgba(59, 130, 246, 0.15);
  }
}

.saas-cta-float-wrapper {
  display: inline-block;
  animation: cta-float 6s ease-in-out infinite;
}

.saas-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 1.5px;
  background: linear-gradient(90deg, #8B5CF6, #3B82F6, #EC4899, #8B5CF6);
  background-size: 300% 300%;
  animation: border-gradient 8s ease infinite;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.2), 0 0 50px rgba(59, 130, 246, 0.15);
  transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), scale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  will-change: transform, box-shadow;
}

.saas-cta:hover {
  scale: 1.05;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.55), 0 0 70px rgba(59, 130, 246, 0.4);
}

.saas-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 9999px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  overflow: hidden;
  width: 100%;
  height: 100%;
}



.saas-cta-icon-pulse {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  animation: pulse-icon 2.5s infinite ease-in-out;
}

/* Sleek Modal System */
.saas-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.saas-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1;
}

.saas-modal-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  padding: 20px;
  box-sizing: border-box;
}

.saas-modal-content {
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px;
  max-height: 80vh;
  overflow-y: auto;
  color: #c9c9c9;
  font-family: 'SF Pro Display', 'General Sans', sans-serif;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-modal.open .saas-modal-content {
  transform: scale(1);
}

/* Custom Scrollbar for Modal Content */
.saas-modal-content::-webkit-scrollbar {
  width: 6px;
}
.saas-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.saas-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
.saas-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Modal Close Button */
.saas-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.saas-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* Typography Inside Modal */
.saas-modal-header h2 {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}
.saas-modal-body {
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.7;
}
.saas-modal-body p {
  margin-bottom: 18px;
}
.saas-modal-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 28px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.saas-modal-body ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}
.saas-modal-body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}
.saas-modal-body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: #ef4444;
}

@media (max-width: 640px) {
  .saas-modal-content {
    padding: 24px;
    border-radius: 16px;
  }
  .saas-modal-header h2 {
    font-size: 24px;
  }
  .saas-modal-close {
    top: 16px;
    right: 16px;
  }
}



