@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
  }
  
  body {
    @apply bg-dark-950 text-dark-50 font-sans antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
}

@layer components {
  .text-gradient {
    @apply bg-clip-text text-transparent bg-gradient-to-r from-accent-400 via-accent-500 to-accent-600;
  }
  
  .glass {
    @apply bg-dark-900/80 backdrop-blur-xl border border-dark-700/50;
  }
  
  .card-hover {
    @apply transition-all duration-300 hover:scale-105 hover:shadow-2xl hover:shadow-primary-500/30;
  }
  
  .logo-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #22c55e 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .section-padding {
    @apply py-20 md:py-32 lg:py-40;
  }
  
  .container-custom {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
    width: 100%;
    box-sizing: border-box;
  }
}

/* Prevent horizontal overflow */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

body {
  margin: 0;
  padding: 0;
}

section {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* Ensure all containers respect viewport width */
.container-custom {
  width: 100%;
  max-width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.container-custom > * {
  max-width: 100%;
}

/* Fix absolute positioned decorative elements */
.absolute {
  max-width: 100vw;
  overflow: hidden;
}

/* Prevent negative margins and positions from breaking layout */
[class*="-top-"],
[class*="-right-"],
[class*="-bottom-"],
[class*="-left-"] {
  max-width: calc(100vw + 5rem);
}

/* Grid and flex containers */
.grid,
.flex {
  max-width: 100%;
}

/* Prevent text and content overflow */
h1, h2, h3, h4, h5, h6, p, span, div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@layer utilities {
  .perspective-1000 {
    perspective: 1000px;
  }
  
  .transform-3d {
    transform-style: preserve-3d;
  }
  
  .backface-hidden {
    backface-visibility: hidden;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  @apply bg-dark-900;
}

::-webkit-scrollbar-thumb {
  @apply bg-primary-600 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-primary-500;
}

/* Logo styling */
.logo-text {
  background: linear-gradient(135deg, #f59e0b 0%, #22c55e 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Animated background gradient */
.animated-gradient {
  background: linear-gradient(-45deg, #020617, #0f172a, #1e293b, #334155);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

/* Floating elements */
.floating {
  animation: float 6s ease-in-out infinite;
}

.floating-delayed {
  animation: float 8s ease-in-out infinite;
  animation-delay: -2s;
}

/* Parallax effect */
.parallax {
  will-change: transform;
}

/* Glow effect */
.glow {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.glow-strong {
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
}

/* Text reveal animation */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.text-reveal.revealed span {
  transform: translateY(0);
}

/* Number counter animation */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Interactive grid */
.interactive-grid {
  display: grid;
  gap: 1rem;
}

.interactive-grid-item {
  transition: all 0.3s ease;
  cursor: pointer;
}

.interactive-grid-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Timeline connector */
.timeline-connector {
  position: relative;
}

.timeline-connector::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #0284c7, transparent);
  transform: translateX(-50%);
}

/* Asymmetric layout helper - disabled to prevent overflow */
.asymmetric-left {
  margin-left: 0;
  margin-right: 0;
}

.asymmetric-right {
  margin-right: 0;
  margin-left: 0;
}

