/* Hi-Ai Home Page Styles */

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-gray);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.nav-brand {
  font-size: var(--text-2xl);
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-brand .text-mint {
  margin-right: -2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  margin: 0;
}

.nav-link {
  color: var(--medium-gray);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--soft-blue);
  text-decoration: none;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.mobile-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--dark-gray);
  margin: 3px 0;
  transition: var(--transition-fast);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
  position: relative;
  overflow: hidden;
  padding-top: 100px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-title {
  font-size: var(--text-6xl);
  line-height: 1.1;
  margin-bottom: var(--space-6);
  animation-delay: 0.1s;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  animation-delay: 0.3s;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  animation-delay: 0.5s;
}

/* Animated Services Connection - DESKTOP ONLY */
.services-animation {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-node {
  position: absolute;
  background-color: var(--white);
  border-radius: var(--rounded-2xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  opacity: 0;
  animation: nodeAppear 0.8s ease-out forwards;
}

.service-node:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

#social-media {
  top: 50px;
  left: 50px;
  animation-delay: 0.2s;
}

#web-dev {
  top: 30px;
  right: 30px;
  animation-delay: 0.4s;
}

#ai-integration {
  top: 50%;
  right: 50px;
  transform: translateY(-50%);
  animation-delay: 0.6s;
}

.node-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-2);
}

.node-label {
  font-weight: 600;
  color: var(--dark-gray);
  font-size: var(--text-sm);
}

.connection-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connection-line {
  fill: none;
  stroke: var(--soft-blue);
  stroke-width: 2;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  opacity: 0.6;
  animation: drawLine 2s ease-in-out forwards;
}

.line-1 {
  animation-delay: 1s;
}

.line-2 {
  animation-delay: 1.2s;
}

.line-3 {
  animation-delay: 1.4s;
}

.ai-hub {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  animation: hubAppear 1s ease-out 1.6s forwards;
}

.hub-pulse {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--mint-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
  opacity: 0.3;
}

.hub-icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-1);
}

.hub-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile Services Preview - MOBILE ONLY */
.mobile-services-preview {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-8) 0;
  margin-top: var(--space-6);
}

.mobile-service-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.mobile-service-icon:nth-child(1) { animation-delay: 0.2s; }
.mobile-service-icon:nth-child(2) { animation-delay: 0.4s; }
.mobile-service-icon:nth-child(3) { animation-delay: 0.6s; }

.mobile-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--rounded-xl);
  font-size: var(--text-2xl);
  box-shadow: var(--shadow-md);
}

.mobile-icon-label {
  font-size: var(--text-xs);
  color: var(--dark-gray);
  font-weight: 600;
  text-align: center;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.primary-service {
  grid-row: 1 / 3;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--rounded-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.primary-service {
  border-color: var(--mint-green);
  background: linear-gradient(135deg, var(--white) 0%, rgba(74, 222, 128, 0.05) 100%);
}

.service-icon {
  margin-bottom: var(--space-6);
}

.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--rounded-2xl);
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.service-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
  color: var(--black);
}

.service-description {
  color: var(--medium-gray);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.service-features {
  list-style: none;
  margin-bottom: var(--space-8);
}

.service-features li {
  margin-bottom: var(--space-3);
  color: var(--medium-gray);
  font-weight: 500;
}

.service-cta {
  margin-top: auto;
}

/* Advantages Grid */
.advantages-grid {
  margin-top: var(--space-12);
}

.advantage-card {
  text-align: center;
  padding: var(--space-6);
  background-color: var(--white);
  border-radius: var(--rounded-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.advantage-icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.advantage-card h4 {
  color: var(--black);
  margin-bottom: var(--space-3);
}

.advantage-card p {
  color: var(--medium-gray);
  font-size: var(--text-sm);
}

/* CTA Section */
.cta-section {
  background: var(--primary-gradient);
  color: var(--white);
}

.cta-title {
  font-size: var(--text-4xl);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.cta-subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-secondary {
  background-color: var(--white);
  color: var(--soft-blue);
  border-color: var(--white);
}

/* Footer */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: var(--space-12) 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-brand {
  font-size: var(--text-2xl);
  font-weight: 800;
}

.footer-brand .text-mint {
  margin-right: -2px;
}

.footer-text {
  color: var(--medium-gray);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-links a {
  color: var(--medium-gray);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--white);
}

/* Animations */
@keyframes nodeAppear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes hubAppear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .primary-service {
    grid-row: auto;
  }
  
  .nav-buttons {
    display: none;
  }
}

/* CRITICAL: Hide ALL desktop animations on mobile/tablet */
@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  /* HIDE ALL DESKTOP ANIMATIONS AND GRAPHICS */
  .services-animation,
  .service-node,
  .connection-lines,
  .ai-hub,
  .hub-pulse {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  /* Show clean mobile services preview */
  .mobile-services-preview {
    display: flex;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-content {
    text-align: center;
    flex-direction: column;
  }
}

/* Enhanced Mobile Layout - CLEAN AND OPTIMIZED */
@media (max-width: 480px) {
  .hero {
    padding-top: 100px;
    padding-bottom: var(--space-8);
    min-height: auto;
  }
  
  .hero-content {
    gap: var(--space-8);
    text-align: center;
  }
  
  .hero-title {
    font-size: calc(var(--text-3xl) + 0.2rem);
    line-height: 1.25;
    margin-bottom: var(--space-5);
    /* Prevent awkward text wrapping */
    word-spacing: -0.1em;
    letter-spacing: -0.02em;
    hyphens: none;
    word-break: keep-all;
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
    line-height: 1.5;
    margin-bottom: var(--space-6);
    max-width: none;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
  }
  
  .hero-buttons .btn {
    width: 100%;
    text-align: center;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
  
  /* Mobile services preview - clean and professional */
  .mobile-services-preview {
    padding: var(--space-6) 0;
    margin-top: var(--space-4);
    gap: var(--space-6);
  }
  
  .mobile-icon-wrapper {
    width: 50px;
    height: 50px;
    font-size: var(--text-xl);
  }
  
  .mobile-icon-label {
    font-size: 10px;
    max-width: 60px;
    line-height: 1.2;
  }
  
  /* Improve section spacing */
  .section {
    padding: var(--space-12) 0;
  }
  
  .section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
  }
  
  .section-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-8);
  }
  
  /* FORCE HIDE any remaining desktop elements */
  #social-media,
  #web-dev, 
  #ai-integration,
  .ai-hub,
  .hub-pulse,
  .connection-lines,
  .service-node {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .hero-title {
    font-size: var(--text-3xl);
    line-height: 1.3;
    word-spacing: -0.15em;
    letter-spacing: -0.03em;
  }
  
  .hero-subtitle {
    font-size: calc(var(--text-sm) + 0.1rem);
    line-height: 1.6;
  }
  
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .nav-brand {
    font-size: var(--text-xl);
  }
  
  .service-card {
    padding: var(--space-6);
  }
  
  .mobile-services-preview {
    gap: var(--space-4);
  }
  
  .mobile-icon-wrapper {
    width: 45px;
    height: 45px;
    font-size: var(--text-lg);
  }
}

/* Large mobile devices */
@media (min-width: 414px) and (max-width: 480px) {
  .hero-title {
    font-size: calc(var(--text-4xl) - 0.2rem);
    line-height: 1.2;
    word-spacing: -0.05em;
  }
  
  .mobile-services-preview {
    gap: var(--space-8);
  }
}

/* MOBILE FIX: Force hide all desktop animations */
@media (max-width: 768px) {
  .services-animation,
  .service-node,
  .ai-hub,
  .hub-pulse,
  .connection-lines,
  #social-media,
  #web-dev,
  #ai-integration {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }
}
