/* =========================================
   CSS Reset & Variables
   ========================================= */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-lighter: #1e1e1e;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --accent: #e50914;
  /* Cinematic red */
  --accent-hover: #f40612;
  --nav-height: 80px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================================
   Typography & Utilities
   ========================================= */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.accent {
  color: var(--accent);
}

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

.bg-secondary {
  background-color: var(--bg-secondary);
}

.mt-4 {
  margin-top: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(229, 9, 20, 0.3);
}

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

.btn-outline:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

/* =========================================
   Navigation
   ========================================= */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: transparent;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: var(--transition);
}

/* =========================================
   Hero Section
   ========================================= */
#hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("https://images.unsplash.com/photo-1542008985-61bd938634da?q=80&w=2000&auto=format&fit=crop")
    center/cover no-repeat;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    var(--bg-primary) 100%
  );
  z-index: -1;
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 10px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* =========================================
   Portfolio Section
   ========================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/5;
  background-color: var(--bg-lighter);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(229, 9, 20, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

.item-overlay i {
  font-size: 2rem;
  margin-bottom: 15px;
  transform: translateY(20px);
  transition: var(--transition);
}

.item-overlay span {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: var(--transition);
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-item:hover .item-overlay {
  opacity: 1;
}

.portfolio-item:hover .item-overlay i,
.portfolio-item:hover .item-overlay span {
  transform: translateY(0);
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2001;
}

.close-lightbox:hover {
  color: var(--accent);
  transform: scale(1.1);
}

/* =========================================
   Clients Section
   ========================================= */
.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px 80px;
  margin-top: 2rem;
}

.client-logo {
  transition: var(--transition);
  cursor: default;
  opacity: 0.6;
}

.client-logo img {
  width: 150px;
  border-radius: 100%;
}

@media (max-width: 768px) {
  .client-logo img {
    width: 100px;
  }
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* =========================================
   Projects (Cards) Section
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.project-card {
  background-color: var(--bg-lighter);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(229, 9, 20, 0.3);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.project-thumb {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-thumb img {
  transform: scale(1.08);
}

.project-info {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.project-link i {
  transition: transform 0.3s ease;
}

.project-card:hover .project-link i {
  transform: translateX(5px);
}

/* =========================================
   About Section
   ========================================= */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-paragraph {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 300;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-item {
  border-left: 2px solid var(--accent);
  padding-left: 15px;
}

.stat-number {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.about-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 40px rgba(10, 10, 10, 0.5);
  pointer-events: none;
}

.about-image img {
  width: 100%;
  display: block;
  border-radius: 8px;
  filter: grayscale(20%);
  transition: var(--transition);
}

.about-image:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* =========================================
   Services Section
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: var(--bg-secondary);
  padding: 40px 30px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(229, 9, 20, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* =========================================
   Contact Section
   ========================================= */
.contact-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.contact-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-social {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-lighter);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-social i {
  font-size: 1.2rem;
}

.btn-social.whatsapp:hover {
  background-color: #25d366;
  border-color: #25d366;
  transform: translateY(-3px);
}

.btn-social.instagram:hover {
  background-color: #e1306c;
  border-color: #e1306c;
  transform: translateY(-3px);
}

.btn-social.facebook:hover {
  background-color: #1877f2;
  border-color: #1877f2;
  transform: translateY(-3px);
}

.btn-social.tiktok:hover {
  background-color: #000000;
  border-color: #000000;
  transform: translateY(-3px);
}

.btn-social.email:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* =========================================
   Footer
   ========================================= */
footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer .logo {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-bottom: 30px;
}

footer .programmer p {
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--text-secondary);
  padding-top: 30px;
  padding-bottom: 0;
  font-size: 1rem;
}
footer .programmer i {
  font-size: 26px;
}

/* =========================================
   Animations
   ========================================= */
.hidden {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Media Queries (Mobile First approach applied via max-width for desktop down, 
   but designed primarily flexible)
   ========================================= */
@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
  }

  .contact-buttons {
    flex-direction: column;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: var(--nav-height);
    gap: 0;
    flex-direction: column;
    background-color: rgba(10, 10, 10, 0.98);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    height: calc(100vh - var(--nav-height));
    padding-top: 40px;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 20px 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }
}
