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

:root {
  --primary-color: #2563eb;
  --text-color: #4a5568;
  --bg-color: #f9fafb;
  --spacing-unit: 1rem;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
  color: var(--text-color);
  scroll-behavior: smooth;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
}

/* Base font size for different screen sizes */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 12px;
  }
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-color: #f9fafb;
  pointer-events: none; /* Ensures clicks pass through to elements below */
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background-image 1s ease-in-out;
  z-index: 1;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    text-align: left;
    justify-content: flex-start;
    padding-left: 100px;
  }
}

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.1));
  z-index: 1;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
  transition: all 0.3s ease;
}

.sidebar button {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: white;
  color: #4a5568;
  font-size: 18px;

  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar button.active {
  background: var(--primary-color);
  color: #fff;
}

.sidebar button:hover {
  transform: scale(1.1);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;

  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .sidebar {
    left: 10px;
  }
  
  .sidebar button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    left: -100%;
    top: 0;
    height: 100vh;
    width: 70px;
    background: rgba(255, 255, 255, 0.95);
    padding: 80px 10px 20px;
    transform: none;
    transition: left 0.3s ease;
    z-index: 9999;
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .sidebar button {
    width: 50px;
    height: 50px;
    margin: 0 auto;
  }
}

/* Device Mockups */
.device-mockups {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 45%;
  height: 80vh;
  perspective: 2000px;
  display: none; /* Hidden by default on mobile */
}

@media (min-width: 1024px) {
  .device-mockups {
    display: block;
  }
}

/* MacBook */
.macbook {
  position: absolute;
  width: 70%;
  height: 55%;
  right: 5%;
  top: 50%;
  transform: translateY(-50%) rotateY(-15deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  z-index: 2;
}

.macbook .screen {
  position: absolute;
  width: 100%;
  height: 80%;
  background: #1d1d1d;
  border-radius: 10px 10px 0 0;
  border: 12px solid #0a0a0a;
  border-bottom: none;
  box-shadow: 0 0 0 1px #333;
  overflow: hidden;
  background-image: url('https://kms-technology.com/wp-content/uploads/2022/08/iStock-1147369741-scaled.jpg');
  background-size: cover;
  background-position: center;
  background-color: #fff;
}

.macbook .bottom {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 10px;
  background: #c0c0c0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* iPad */
.ipad {
  position: absolute;
  width: 35%;
  height: 55%;
  right: 55%;
  top: 12%;
  transform: rotateY(15deg) rotateZ(10deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  z-index: 2;
}

.ipad .screen {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 10px;
  border: 10px solid #333;
  box-shadow: 0 0 0 1px #555;
  overflow: hidden;
  background-image: url('https://bugbug-homepage.s3.eu-central-1.amazonaws.com/image_e357f5b247.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
}

/* iPhone */
.iphone {
  position: absolute;
  width: 14%;
  height: 28%;
  right: 42%;
  bottom: 10%;
  transform: rotateY(15deg) rotateZ(-5deg);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  z-index: 3;
}

.iphone .screen {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #111;
  border-radius: 25px;
  border: 8px solid #222;
  box-shadow: 0 0 0 1px #444;
  overflow: hidden;
  background-image: url('https://img.freepik.com/free-vector/qa-engineer-concept-illustration_114360-1084.jpg');
  background-size: cover;
  background-position: center;
}

/* Hover effects */
.device-mockups:hover .macbook {
  transform: translateY(-50%) rotateY(-10deg);
}

.device-mockups:hover .ipad {
  transform: rotateY(10deg) rotateZ(10deg);
}

.device-mockups:hover .iphone {
  transform: rotateY(20deg) rotateZ(-5deg);
}

/* Intro Text */
.intro {
  position: relative;
  z-index: 2;
  padding: 0 10%;
  max-width: 50%;
}
.intro h1 {
  font-size: 60px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #2d3748;
}
.intro h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #475569;
}
.intro h2 span {
  font-weight: bold;
  text-decoration: underline;
}

/* Social Links */
.social {
  display: flex;
  gap: 20px;
  font-size: 24px;
}
.social a {
  color: #4a5568;
  text-decoration: none;
  transition: color 0.3s;
}
.social a:hover {
  color: #2563eb;
}

/* General Sections */
.section {
  padding: 100px 80px;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(2px);
}
.section:nth-child(even) {
  background: rgba(249, 250, 251, 0.7);
  backdrop-filter: blur(2px);
}
.section h2 {
  font-size: 40px;
  margin-bottom: 20px;
  color: #2d3748;
}
.section p {
  font-size: 18px;
  color: #475569;
  max-width: 800px;
}
