/* ======================================================
   PW Studios — Main Stylesheet
   Author: Paul Wood
   ====================================================== */

/* =======================
   Base Variables & Typography
   ======================= */
:root {
  --primary: #0d6efd;
  --accent: #00bfa5;
  --dark: #1b1b1b;
  --light: #f8f9fa;
  --text: #333;
  --font-main: "Inter", Arial, sans-serif;
}

body {
  font-family: var(--font-main);
  color: var(--text);
  background-color: #fff;
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* =======================
   Navbar
   ======================= */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  font-weight: 500;
}

.navbar-brand {
  font-size: 1.5rem;
}

.navbar .nav-link {
  color: var(--text);
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--primary);
}

/* =======================
   HERO SECTION
   ======================= */
.hero {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden; /* ✅ contains particles */
  background: radial-gradient(circle at 40% 30%, #0b1f40, #000814 85%);
}

/* Subtle animated gradient overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 110, 253, 0.12),
    rgba(0, 191, 165, 0.08)
  );
  mix-blend-mode: overlay;
  animation: gradientShift 10s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes gradientShift {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(-2%, -2%) scale(1.03); opacity: 1; }
  100% { transform: translate(2%, 2%) scale(1); opacity: 0.6; }
}

/* Particle container (holds the canvas) */
#hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

/* Particle canvas */
#hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

/* Hero text content */
.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-weight: 700;
  font-size: 2.8rem;
  margin-bottom: 1rem;
  animation: fadeUp 1s ease-out forwards;
  opacity: 0;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #cfefff;
  animation: fadeUp 1.2s ease-out forwards;
}

.hero .btn {
  padding: 0.8rem 1.8rem;
  font-weight: 500;
  border-radius: 6px;
}

.hero .btn-light {
  background-color: rgba(255, 255, 255, 0.9);
  color: #000814;
  border: none;
  transition: all 0.3s ease;
}

.hero .btn-light:hover {
  background-color: #fff;
  color: var(--primary);
}

/* Static SVG fallback for mobile (instead of particles) */
@media (max-width: 991px) {
  #hero-bg {
    background: url("/assets/images/hero-network.svg") center/cover no-repeat;
    animation: floatBg 20s ease-in-out infinite alternate;
  }
}

@keyframes floatBg {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-20px) scale(1.03); }
}

/* =======================
   Global Animations
   ======================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.brand-track {
  display: flex;
  align-items: center;
  gap: 6rem;
  width: max-content;
  animation: scrollBrands 20s linear infinite;
  will-change: transform;
}

/* ✅ Infinite seamless scroll */
@keyframes scrollBrands {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.brand-logo {
  max-height: 55px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.brand-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.brand-track:hover {
  animation-play-state: paused;
}

/* ✅ Critical fix: make track actually twice as wide */
.brand-track::after {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 50%;
}


/* =======================
   Services
   ======================= */
#services {
  background-color: var(--light);
  animation: fadeInUp 1s ease both;
}

.service-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem 1rem;
  transition: all 0.3s ease, transform 0.3s ease;
}

.service-card i {
  color: var(--primary);
  transition: transform 0.4s ease, color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  background: linear-gradient(180deg, #fff, #f8f9ff);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.service-card:hover i {
  transform: scale(1.2);
  color: var(--accent);
}

/* =======================
   Work / Projects
   ======================= */
#work {
  background-color: var(--light);
  animation: fadeInUp 1s ease both;
}

#work .card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
}

#work .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

#work .card-img-top {
  height: 200px;
  object-fit: cover;
  filter: brightness(0.95);
  transition: filter 0.4s ease;
}

#work .card:hover .card-img-top {
  filter: brightness(1.05);
}

/* =======================
   Process
   ======================= */
#how {
  background-color: #fff;
  animation: fadeInUp 1s ease both;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: bold;
  font-size: 1.2rem;
}

/* =======================
   About Section
   ======================= */
#about {
  background-color: var(--light);
  animation: fadeInUp 1s ease both;
}

#about p {
  font-size: 1.1rem;
  color: #555;
}

/* =======================
   Contact
   ======================= */
#contact {
  background-color: var(--primary);
  color: #fff;
  animation: fadeInUp 1s ease both;
}

#contact .btn-light {
  background-color: #fff;
  color: var(--primary);
  border: 2px solid #fff;
  font-weight: 600;
  transition: all 0.3s ease;
}

#contact .btn-light:hover {
  background-color: transparent;
  color: #fff;
  border-color: #fff;
}

/* =======================
   Footer
   ======================= */
footer {
  font-size: 0.9rem;
  background-color: var(--dark);
  color: #fff;
  text-align: center;
}

/* =======================
   Responsiveness
   ======================= */
@media (max-width: 992px) {
  .hero {
    height: auto;
    padding: 6rem 1rem 4rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .brand-track {
    gap: 2rem;
    animation-duration: 60s;
  }

  .brand-logo {
    max-height: 40px;
    max-width: 90px;
  }

  .service-card {
    padding: 1.5rem;
  }
}
