/* ========================================
   BAM Group Holdings - Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
  --void-black: #0a0a0c;
  --deep-charcoal: #111113;
  --e-waste-green: #11c859;
  --sage-green: #14a34a;
  --pure-white: #ffffff;
  --muted-grey: #88888b;
  --dim-grey: #555557;
  --dark-grey: #222223;

  --font-display: 'Instrument Serif', serif;
  --font-body: 'DM Sans', sans-serif;

  --max-width: 1200px;
  --section-padding: 120px;
  --section-padding-mobile: 80px;
  --grid-gap: 32px;

  --transition-fast: 300ms ease;
  --transition-medium: 500ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--pure-white);
  background-color: var(--void-black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.loaded {
  opacity: 1;
}

body:not(.loaded) {
  opacity: 0;
  transition: opacity 600ms ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Base */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--e-waste-green);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--pure-white);
  margin-bottom: 32px;
}

/* Scroll Reveal Base */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms cubic-bezier(0.33, 1, 0.68, 1), transform 800ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: transparent;
  transition: background var(--transition-medium), padding var(--transition-medium);
}

.main-nav.scrolled {
  background: rgba(10, 10, 12, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 0;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--pure-white);
  letter-spacing: -0.5px;
  z-index: 101;
  position: relative;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-grey);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--e-waste-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--pure-white);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--pure-white);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background-color: var(--void-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background-color: var(--e-waste-green);
  z-index: 5;
  box-shadow: 0 0 20px rgba(17, 200, 89, 0.8), 0 0 60px rgba(17, 200, 89, 0.4);
  transform: translateX(-10px);
}

.hero-scan-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 400;
  letter-spacing: -2px;
  line-height: 1.1;
  color: var(--pure-white);
  margin-bottom: 24px;
  display: inline-block;
}

.hero-title span {
  display: inline-block;
  opacity: 0;
  transform: scale(1.5) translateY(-75%);
  filter: blur(8px);
}

.hero-title span.space {
  opacity: 0;
  width: 0.3em;
  transform: none;
  filter: none;
}

.hero-title span.animated {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0px);
  transition: opacity 250ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 250ms cubic-bezier(0.33, 1, 0.68, 1),
              filter 250ms cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-grey);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 800ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* Ghost Button */
.ghost-btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--muted-grey);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--pure-white);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.ghost-btn:hover {
  border-color: var(--e-waste-green);
  color: var(--e-waste-green);
}

.hero-cta {
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 800ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* ========================================
   Introduction Section
   ======================================== */
.intro-section {
  background: var(--void-black);
}

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

.intro-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted-grey);
  margin-bottom: 64px;
}

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

.stat-item {
  text-align: center;
  padding: 32px 16px;
  border: 1px solid var(--dark-grey);
  position: relative;
}

.stat-number {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--e-waste-green);
  line-height: 1;
  display: inline;
}

.stat-suffix {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  color: var(--e-waste-green);
  line-height: 1;
  display: inline;
}

.stat-label {
  font-size: 14px;
  color: var(--muted-grey);
  margin-top: 12px;
  line-height: 1.4;
}

/* ========================================
   Services Section
   ======================================== */
.services-section {
  background: var(--deep-charcoal);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

.service-card {
  background: var(--void-black);
  border: 1px solid var(--dark-grey);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.service-card:hover {
  border-color: var(--e-waste-green);
}

.service-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-body {
  padding: 32px;
}

.service-title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pure-white);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-grey);
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--e-waste-green);
  transition: gap var(--transition-fast);
}

.service-link:hover {
  gap: 12px;
}

.service-link svg {
  transition: transform var(--transition-fast);
}

.service-link:hover svg {
  transform: translateX(4px);
}

/* ========================================
   Process Section
   ======================================== */
.process-section {
  background: var(--void-black);
  padding-bottom: 0;
}

.process-wrapper {
  padding-bottom: var(--section-padding);
}

.process-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 64px;
}

.process-scroll-container::-webkit-scrollbar {
  display: none;
}

.process-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 calc((100vw - var(--max-width)) / 2 + 24px);
  min-width: max-content;
}

.process-card {
  width: 340px;
  flex-shrink: 0;
  padding: 40px 32px;
  background: var(--deep-charcoal);
  border: 1px solid var(--dark-grey);
  position: relative;
}

.process-number {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 400;
  line-height: 1;
  color: var(--e-waste-green);
  opacity: 0.3;
  margin-bottom: 24px;
}

.process-icon {
  width: 48px;
  height: 48px;
  color: var(--pure-white);
  margin-bottom: 24px;
}

.process-icon svg {
  width: 100%;
  height: 100%;
}

.process-title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pure-white);
  margin-bottom: 12px;
}

.process-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted-grey);
}

.process-connector {
  width: 80px;
  flex-shrink: 0;
  height: 2px;
  background: var(--dark-grey);
  align-self: center;
  position: relative;
}

.process-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--e-waste-green);
  border-radius: 50%;
}

/* ========================================
   Impact Section
   ======================================== */
.impact-section {
  background: var(--deep-charcoal);
}

.impact-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 64px;
  align-items: start;
}

.impact-metrics {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.metric-item {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--dark-grey);
  position: relative;
}

.metric-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
}

.metric-scan line {
  transition: stroke-dashoffset 800ms cubic-bezier(0.76, 0, 0.24, 1);
}

.metric-scan.animated line {
  stroke-dashoffset: 0;
}

.metric-value {
  font-family: var(--font-body);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--e-waste-green);
  line-height: 1.1;
  margin-top: 8px;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 15px;
  color: var(--muted-grey);
  line-height: 1.5;
}

.impact-right {
  padding-top: 80px;
}

.impact-heading {
  font-family: var(--font-body);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--pure-white);
  margin-bottom: 32px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.partner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--dark-grey);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted-grey);
  transition: border-color var(--transition-fast), color var(--transition-fast);
  cursor: default;
}

.partner-badge:hover {
  border-color: var(--e-waste-green);
  color: var(--pure-white);
}

.impact-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-grey);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  background: var(--e-waste-green);
  padding: 100px 0;
}

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

.cta-heading {
  font-family: var(--font-body);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--void-black);
  margin-bottom: 20px;
}

.cta-text {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(10, 10, 12, 0.8);
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 16px 36px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-filled {
  background: var(--void-black);
  color: var(--pure-white);
  border: 2px solid var(--void-black);
}

.btn-filled:hover {
  filter: brightness(1.2);
}

.btn-ghost-dark {
  background: transparent;
  color: var(--void-black);
  border: 2px solid var(--void-black);
}

.btn-ghost-dark:hover {
  background: var(--void-black);
  color: var(--e-waste-green);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--void-black);
  border-top: 1px solid var(--dark-grey);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--pure-white);
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--muted-grey);
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-grey);
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-grey);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--e-waste-green);
}

.contact-info p,
.contact-info a {
  font-size: 15px;
  color: var(--muted-grey);
  line-height: 1.8;
  transition: color var(--transition-fast);
}

.contact-info a:hover {
  color: var(--e-waste-green);
}

.footer-bottom {
  border-top: 1px solid var(--dark-grey);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--dim-grey);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 1024px) {
  .impact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .impact-right {
    padding-top: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .section-heading {
    font-size: 36px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 12, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cta-heading {
    font-size: 36px;
  }

  .process-card {
    width: 280px;
    padding: 32px 24px;
  }

  .process-track {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .metric-value {
    font-size: 40px;
  }

  .stat-number,
  .stat-suffix {
    font-size: 36px;
  }

  .process-connector {
    width: 40px;
  }
}
