:root {
  --bg-color: #f8fafc;
  --bg-secondary: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --accent-primary: #0284c7;
  --accent-secondary: #0369a1;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.1);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 90px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.5px;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Content */
main {
  flex: 1;
  padding-top: 100px; /* offset for fixed header */
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4rem 5%;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/entrepot_vide.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--bg-color) 35%, rgba(248, 250, 252, 0.8) 45%, transparent 60%);
  z-index: -1;
}

.hero-content {
  max-width: 650px;
  animation: fadeUp 1s ease-out forwards;
  z-index: 10;
  position: relative;
}

/* Hero Content Boxes */
.hero-box-dark {
  background: rgba(15, 23, 42, 0.95); /* Dark slate/almost black */
  padding: 2rem 2.5rem;
  border-left: 8px solid var(--accent-primary);
  margin-bottom: 0;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  display: block;
}

.hero-box-dark h1 {
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff;
  margin-bottom: 0 !important;
  font-size: 3.2rem !important;
  line-height: 1.2;
}

.hero-box-light {
  background: rgba(248, 250, 252, 0.95); /* Light grey/white */
  padding: 1.5rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  display: block;
}

.hero-box-light h2 {
  font-size: 1.3rem;
  color: var(--accent-primary);
  margin-bottom: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-box-light p {
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0 !important;
}

/* Hero Machines (Dynamic Layer) */
.hero-machines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 5%;
}

.machine-img {
  max-height: 50vh;
  object-fit: contain;
  margin-left: -5%;
  animation: fadeUp 1.2s ease-out forwards;
  opacity: 0;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.4));
}

.machine-left {
  animation-delay: 0.2s;
  max-height: 45vh;
  z-index: 1;
}

.machine-center {
  animation-delay: 0.4s;
  max-height: 35vh;
  margin-top: 15vh;
  z-index: 2;
}

.machine-right {
  animation-delay: 0.6s;
  max-height: 40vh;
  z-index: 3;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--text-main), var(--accent-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--accent-primary);
  margin-left: 1rem;
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-3px);
}

/* Sections */
.section {
  padding: 6rem 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 3px;
  bottom: -10px;
  left: 20%;
  background: var(--accent-primary);
  border-radius: 2px;
}

/* Grids & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
  font-size: 2.5rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
}

.card-image {
  margin: -2rem -2rem 1.5rem -2rem;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Forms */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 3rem;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Brands Grid */
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.brand-item {
  flex: 0 1 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(80%) opacity(70%);
}

.brand-item:hover {
  transform: translateY(-5px);
}

.brand-item:hover img {
  filter: grayscale(0%) opacity(100%);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--card-border);
  padding: 3rem 5%;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  transition: background 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* Catalog Grid Showcase */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.catalog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-primary);
}

.catalog-card .img-container {
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  border-radius: 8px;
}

.catalog-card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15));
  transition: transform 0.4s ease;
}

.catalog-card:hover img {
  transform: scale(1.1);
}

.catalog-card h4 {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.4;
}

.catalog-card p.card-badge {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 768px) {
  .hero::after {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.8) 100%);
  }
  
  .hero-machines {
    opacity: 0.15;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero-box-dark {
    padding: 1.5rem;
    border-left-width: 5px;
  }
  
  .hero-box-light {
    padding: 1.5rem;
  }
  
  .hero-box-dark h1 {
    font-size: 2.2rem !important;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    border-bottom: 1px solid var(--glass-border);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .btn-secondary {
    margin-left: 0;
    margin-top: 1rem;
    display: block;
  }
}
