/* Adding vibrant Google-inspired color palette and playful design elements */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Theme Base Colors */
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-tertiary: #1a1a1a;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;

  /* Google-Inspired Vibrant Colors */
  --color-blue: #4285f4;
  --color-red: #ea4335;
  --color-yellow: #fbbc04;
  --color-green: #34a853;
  --color-orange: #ff6d00;
  --color-cyan: #00bcd4;

  /* Hover States */
  --color-blue-hover: #5a95f5;
  --color-red-hover: #ef5d50;
  --color-yellow-hover: #fcc934;
  --color-green-hover: #46b566;
  --color-orange-hover: #ff8534;
  --color-cyan-hover: #26c6da;

  /* Borders & Accents */
  --border-color: #262626;
  --border-accent: #333333;
}

html {
  /* Prevent horizontal scroll at root level */
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  /* Ensure container doesn't overflow */
  width: 100%;
  box-sizing: border-box;
}

/* Improved CSS-only hamburger menu for mobile */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: relative;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 998;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  /* Ensure mobile nav doesn't cause overflow */
  width: 100%;
  box-sizing: border-box;
}

.nav-mobile a {
  display: block;
  padding: 1rem 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-mobile a:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-left-color: var(--color-blue);
}

/* Fixed toggle menu visibility when checkbox is checked */
.menu-toggle:checked ~ .nav-mobile {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Animate hamburger to X when menu is open */
.menu-toggle:checked ~ .header-container .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle:checked ~ .header-container .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .header-container .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  /* Ensure header doesn't cause overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  /* Make header container responsive and prevent overflow */
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
  /* Prevent logo from shrinking on mobile */
  flex-shrink: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
  /* Ensure icon doesn't cause overflow */
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  gap: 2rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-desktop a:hover {
  color: var(--text-primary);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
  transition: width 0.3s;
}

.nav-desktop a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  gap: 1rem;
  /* Prevent actions from overflowing */
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 0.875rem;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  color: white;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}

.btn-outline:hover {
  background: var(--bg-secondary);
  border-color: var(--color-blue);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 10rem 0 6rem;
  overflow: hidden;
  /* Ensure hero doesn't cause horizontal scroll */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

/* Floating colorful shapes animation */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  opacity: 0.15;
  animation: float 20s infinite ease-in-out;
}

.shape-circle {
  border-radius: 50%;
}

.shape-square {
  border-radius: 12px;
}

.shape-triangle {
  width: 0;
  height: 0;
  background: transparent !important;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
}

.shape.red {
  background: var(--color-red);
  width: 120px;
  height: 120px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.shape.blue {
  background: var(--color-blue);
  width: 100px;
  height: 100px;
  top: 60%;
  left: 80%;
  animation-delay: 2s;
}

.shape.yellow {
  border-bottom: 120px solid var(--color-yellow);
  top: 30%;
  right: 15%;
  animation-delay: 4s;
}

.shape.green {
  background: var(--color-green);
  width: 90px;
  height: 90px;
  bottom: 20%;
  left: 5%;
  animation-delay: 6s;
}

.shape.orange {
  background: var(--color-orange);
  width: 80px;
  height: 80px;
  top: 70%;
  right: 30%;
  animation-delay: 8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) rotate(5deg);
  }
  50% {
    transform: translateY(-60px) rotate(-5deg);
  }
  75% {
    transform: translateY(-30px) rotate(3deg);
  }
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(66, 133, 244, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(66, 133, 244, 0.1);
  border: 1px solid rgba(66, 133, 244, 0.3);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--color-blue);
  margin-bottom: 2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan), var(--color-green));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 5s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Tech Strip */
.tech-strip {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  /* Prevent tech strip overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tech-label {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  /* Add padding for mobile to prevent edge overflow */
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-blue);
}

/* Individual colored dots for tech items */
.tech-item.blue-dot .tech-dot {
  background: var(--color-blue);
  box-shadow: 0 0 10px rgba(66, 133, 244, 0.5);
}

.tech-item.red-dot .tech-dot {
  background: var(--color-red);
  box-shadow: 0 0 10px rgba(234, 67, 53, 0.5);
}

.tech-item.yellow-dot .tech-dot {
  background: var(--color-yellow);
  box-shadow: 0 0 10px rgba(251, 188, 4, 0.5);
}

.tech-item.green-dot .tech-dot {
  background: var(--color-green);
  box-shadow: 0 0 10px rgba(52, 168, 83, 0.5);
}

.tech-item.orange-dot .tech-dot {
  background: var(--color-orange);
  box-shadow: 0 0 10px rgba(255, 109, 0, 0.5);
}

.tech-item.cyan-dot .tech-dot {
  background: var(--color-cyan);
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}

/* Services Section */
.services {
  padding: 6rem 0;
  /* Prevent services section overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.services-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.text-blue {
  color: var(--color-blue);
}

.services-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s;
}

.link-arrow:hover {
  gap: 0.75rem;
}

.services-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Adding colorful card variants with unique accent colors */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-blue);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.card:hover::before {
  transform: scaleX(1);
}

.card.card-blue::before {
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
}

.card.card-green::before {
  background: linear-gradient(90deg, var(--color-green), var(--color-cyan));
}

.card.card-orange::before {
  background: linear-gradient(90deg, var(--color-orange), var(--color-yellow));
}

.card.card-cyan::before {
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(66, 133, 244, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-blue);
}

.card.card-blue .card-icon {
  background: rgba(66, 133, 244, 0.1);
  color: var(--color-blue);
}

.card.card-green .card-icon {
  background: rgba(52, 168, 83, 0.1);
  color: var(--color-green);
}

.card.card-orange .card-icon {
  background: rgba(255, 109, 0, 0.1);
  color: var(--color-orange);
}

.card.card-cyan .card-icon {
  background: rgba(0, 188, 212, 0.1);
  color: var(--color-cyan);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Approach Section */
.approach {
  padding: 6rem 0;
  background: var(--bg-secondary);
  /* Prevent approach section overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.approach-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.approach-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Adding colorful icon backgrounds */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(66, 133, 244, 0.1);
  color: var(--color-blue);
}

.feature-icon.icon-yellow {
  background: rgba(251, 188, 4, 0.1);
  color: var(--color-yellow);
}

.feature-icon.icon-red {
  background: rgba(234, 67, 53, 0.1);
  color: var(--color-red);
}

.feature-icon.icon-green {
  background: rgba(52, 168, 83, 0.1);
  color: var(--color-green);
}

.feature-item h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.feature-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  word-wrap: break-word;
}

.approach-visual {
  position: relative;
  height: 400px;
}

.visual-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  padding: 3rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-content {
  text-align: center;
}

.visual-icon-wrapper {
  margin-bottom: 1.5rem;
  color: var(--color-cyan);
}

.visual-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Adding colorful decorative elements */
.visual-decor-1,
.visual-decor-2,
.visual-decor-3 {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(40px);
}

.visual-decor-1 {
  width: 200px;
  height: 200px;
  background: var(--color-blue);
  top: -50px;
  right: -50px;
  animation: float 8s infinite ease-in-out;
}

.visual-decor-2 {
  width: 150px;
  height: 150px;
  background: var(--color-green);
  bottom: -30px;
  left: -30px;
  animation: float 10s infinite ease-in-out 2s;
}

.visual-decor-3 {
  width: 120px;
  height: 120px;
  background: var(--color-orange);
  top: 50%;
  left: -60px;
  animation: float 12s infinite ease-in-out 4s;
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  position: relative;
  text-align: center;
  /* Prevent contact section overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.contact-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.15), transparent 70%);
  pointer-events: none;
}

.contact-content {
  position: relative;
  z-index: 10;
}

.contact h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
}

.contact-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: calc(100% - 3rem);
  box-sizing: border-box;
}

.contact-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-email {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: opacity 0.3s;
  /* Allow email to break on mobile */
  word-break: break-all;
  overflow-wrap: break-word;
}

.contact-email:hover {
  opacity: 0.8;
}

.contact-note {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  /* Prevent footer overflow */
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.logo-icon-sm {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  /* Allow footer links to wrap on small screens */
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

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

/* Responsive */
@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 2fr;
  }

  .approach-container {
    grid-template-columns: 1fr 1fr;
  }
}

/* Improved mobile responsive styles to prevent overflow */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }

  .header-actions {
    display: none;
  }

  /* Show mobile nav when hamburger is checked */
  .nav-mobile {
    display: block;
  }

  /* Completing mobile styles that were truncated */
  .header-container {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .hero {
    padding: 8rem 0 4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    padding: 0 0.5rem;
  }

  .btn {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  .services,
  .approach,
  .contact {
    padding: 4rem 0;
  }

  .services-cards {
    grid-template-columns: 1fr;
  }

  .tech-grid {
    gap: 1rem;
    padding: 0 0.5rem;
  }

  .tech-item {
    font-size: 0.8rem;
  }

  .contact-email {
    font-size: 1.1rem;
  }

  .contact-box {
    padding: 1.5rem;
    width: calc(100% - 2rem);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }
}

/* About section styles */
.about {
  padding: 6rem 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
