/* ======================
   ROOT & BASE STYLES
   ====================== */
:root {
  --primary: #ffffff; /* Primary brand color */
  --accent: #cccccc; /* Secondary accent color */
  --bg: #000000; /* Background color */
  --text: #ffffff; /* Primary text color */
  --muted: #aaaaaa; /* Secondary text/muted color */
}

* {
  box-sizing: border-box; /* Consistent box model */
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ======================
     LAYOUT COMPONENTS
     ====================== */
section {
  padding: 8rem 5vw;
  scroll-margin-top: 80px;
  max-width: 100%;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary);
  letter-spacing: 1px;
  text-align: center;
}

section:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

section#contact {
  background: rgba(255, 255, 255, 0.05);
}

/* ======================
     HEADER & NAVIGATION
     ====================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5vw;
  background: rgba(0, 0, 0, 0.95);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5vw;
  height: 80px;
}

/* Logo Styles */
.logo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  height: 100%;
  transition: opacity 0.3s ease;
}

.logo-image {
  height: 150%;
  width: auto;
  filter: contrast(120%) brightness(110%);
  mix-blend-mode: luminosity;
  transition: all 0.3s ease;
}

.logo:hover .logo-image {
  filter: contrast(140%) brightness(130%);
  opacity: 0.9;
}

/* Menu Toggle Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Navigation Styles */
nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.5rem 0;
}

nav a:hover {
  color: var(--accent);
}

.current-page {
  position: relative;
}

.current-page::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

/* ======================
     HERO SECTION
     ====================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
  padding: 0 5vw;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
}

.hero p {
  text-align: left;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ======================
     CTA BUTTONS
     ====================== */
.cta-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cta {
  padding: 0.9rem 2.2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  background-color: var(--primary);
  color: var(--bg);
  border: none;
  transition: background-color 0.3s, color 0.3s;
}

.cta.secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.cta:hover {
  background-color: var(--accent);
  color: var(--bg);
}

.cta.secondary:hover {
  background-color: var(--primary);
  color: var(--bg);
}

/* ======================
     CARD COMPONENTS
     ====================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1400px; /* Match your section container width */
  margin: 0 auto;
  justify-items: center; /* Centers items in their grid cells */
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  padding: 2rem 1.2rem;
  text-align: center;
  box-shadow: 0 2px 16px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--primary);
  position: relative;
  width: 100%;
  max-width: 350px;
}

.service-card:hover,
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px 0 rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
}

/* Brand Card Specific Styles */
.brand-card {
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  overflow: visible;
}

.brand-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

/* ======================
   BRAND LINK STYLES
   ====================== */
.brand-link {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.1);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-link:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

/* Make brand cards position-relative for absolute positioning */
.brand-card {
  position: relative;
  padding-bottom: 3rem; /* Add space at bottom for stats */
}

/* Optional: Add subtle animation on card hover */
.brand-card:hover .brand-link {
  transform: translateY(-3px);
}

/* ======================
     CONTENT BLOCKS
     ====================== */
.service-icon,
.brand-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.service-title,
.brand-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.brand-title {
  font-size: 1.4rem;
  margin: 0.5rem 0 1rem;
}

.service-desc,
.brand-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.brand-desc {
  margin-bottom: 1.5rem;
}

/* ======================
     ABOUT SECTION
     ====================== */
.about-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  max-width: 1400px;
  margin: 0 auto;
}

.about-text {
  flex: 1 1 50%;
  min-width: 300px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.about-text strong {
  color: var(--primary);
  font-weight: 600;
}

.highlight-box {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--primary);
  padding: 1.5rem;
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.highlight-box i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 0.3rem;
}

.highlight-box h4 {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.about-visual {
  flex: 1 1 40%;
  min-width: 300px;
  display: flex;
  justify-content: center;
}

.about-visual svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  stroke: var(--primary);
  fill: none;
  opacity: 0.3;
}

/* ===== PORTFOLIO STATS UPDATE START ===== */
.portfolio-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin: 4rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 2rem 0;
  text-align: center;
  max-width: 1200px;
}

.stat-item {
  min-width: 180px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
}

.stat-number {
  font-size: 3rem; /* Increased from 2.8rem */
  font-weight: 700;
  background: linear-gradient(to right, var(--primary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1.2;
  margin-bottom: 0.8rem; /* Increased spacing */
}

.stat-label {
  color: var(--muted);
  font-size: 1rem; /* Increased from 0.9rem */
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== BRAND SECTION UPDATES START ===== */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem auto 0;
  max-width: 1400px;
}

.brand-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  transition: all 0.3s ease;
}

.brand-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

.brand-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: auto; /* Pushes stats down */
  padding-bottom: 1.5rem;
}

.brand-stats {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.stat-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .brand-card {
    min-height: auto;
    padding: 1.5rem;
  }

  .brand-stats {
    padding-top: 1rem;
  }

  .stat-pill {
    padding: 0.4rem 0.8rem;
  }
}

/* ======================
     Tech Section
     ====================== */
.platform-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}
.platform-visual {
  flex: 1 1 320px;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-visual svg {
  width: 200px;
  height: 200px;
  stroke: var(--primary);
  fill: none;
  opacity: 0.3;
}
.platform-list {
  flex: 1 1 320px;
  min-width: 280px;
  color: var(--muted);
  font-size: 1.1rem;
  list-style: none;
  padding: 0;
}
.platform-list li {
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
}
.platform-list li::before {
  content: "⦿";
  color: var(--primary);
  margin-right: 0.7rem;
  font-size: 1.2rem;
}

/* ======================
   CONTACT SECTION
   ====================== */
#contact {
  background: rgba(255, 255, 255, 0.03);
  padding: 6rem 5vw;
}

.contact-section {
  max-width: 1400px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info,
.contact-form {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-method {
  margin-bottom: 2rem;
}

.contact-method i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 6px;
  font-family: "Inter", sans-serif;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Make email link use CSS variable */
.contact-email {
  color: var(--primary);
  text-decoration: none;
}

.contact-email:hover {
  text-decoration: underline;
}

/* ===== LIGHT MODE TOGGLE START ===== */
:root {
  --primary-light: #333333;
  --accent-light: #555555;
  --bg-light: #ffffff;
  --text-light: #333333;
  --muted-light: #666666;
}

body.light-mode {
  --primary: var(--primary-light);
  --accent: var(--accent-light);
  --bg: var(--bg-light);
  --text: var(--text-light);
  --muted: var(--muted-light);
  filter: none;
}

/* Hidden toggle that can be shown when needed */
.theme-toggle {
  position: fixed;
  bottom: -100px; /* Hide offscreen */
  right: 2rem;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Show class to reveal toggle when needed */
.theme-toggle.show {
  bottom: 2rem;
  opacity: 1;
}

/* Light mode specific adjustments */
body.light-mode {
  /* Card styles */
  --card-bg: rgba(0, 0, 0, 0.03);
  --card-border: rgba(0, 0, 0, 0.08);

  /* Update all card-like elements */
  .brand-card,
  .service-card,
  section:nth-child(even),
  .contact-info,
  .contact-form {
    background: var(--card-bg);
    border-color: var(--card-border);
  }

  .stat-pill,
  .brand-stats {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
  }

  .brand-link {
    background: rgba(0, 0, 0, 0.1);
  }
}
/* ===== LIGHT MODE TOGGLE END ===== */

/* ======================
     FOOTER
     ====================== */
footer {
  background: var(--bg);
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 3rem;
}

/* ======================
     RESPONSIVE ADJUSTMENTS
     ====================== */

/* Menu Toggle Button */
.menu-toggle {
  display: none; /* Hidden by default */
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  padding: 0.5rem;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 80px; /* Match header height */
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  nav a {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
  }

  .current-page::after {
    bottom: -2px;
  }
}

@media (max-width: 800px) {
  header {
    flex-direction: column;
    gap: 1rem;
  }

  .about-content,
  .tech-section {
    flex-direction: column;
    text-align: center;
  }

  .highlight-box {
    flex-direction: column;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .portfolio-stats {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .portfolio-stats {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 1rem 0;
  }

  .stat-item {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .services-grid,
  .brands-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .brand-card {
    padding: 1.5rem;
  }

  .about-visual svg,
  .tech-visual svg {
    width: 120px;
    height: 120px;
  }

  .logo {
    height: 3rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .brand-link {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }
}

/* ===== Custom Carousel Styles ===== */

.custom-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 960px;
  margin: auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  text-align: center;
  padding: 2rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-item img {
  max-width: 320px;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .carousel-item img {
    width: 180px;
    height: auto;
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  z-index: 10;
  transition: background 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.carousel-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.carousel-btn.prev {
  left: 1rem;
}

.carousel-btn.next {
  right: 1rem;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background-color: #888;
  border: none;
  cursor: pointer;
  opacity: 0.5;
}

.carousel-indicators button.active {
  background-color: #fff;
  opacity: 1;
}

.no-grayscale {
  filter: none !important;
}