:root {
  --color-bg: #0a0a0a;
  --color-surface: #141414;
  --color-text: #f5f5f5;
  --color-text-muted: #a0a0a0;
  --color-accent: #e63946;
  --color-nav-bg: rgba(248, 248, 248, 0.92);
  --color-nav-text: #121212;
  --color-nav-border: rgba(0, 0, 0, 0.1);
  --font-primary: 'Inter', sans-serif;
  --spacing-base: 8px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  display: block;
}

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

button, input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--color-accent);
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-muted);
  max-width: 65ch;
}

/* Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--color-accent);
  color: white;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: #ff4d5a;
  transform: translateY(-2px);
}

.section {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

/* Language Toggle - CSS Logic */
html[lang="fr"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="fr"] { display: none !important; }

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-nav-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-nav-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.logo-img {
  height: 58px;
  width: auto;
  transition: opacity 0.3s ease;
}

.logo-img:hover {
  opacity: 0.8;
}

.mobile-only {
  display: none;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

nav a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-nav-text);
  opacity: 0.8;
  position: relative;
}

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

nav a:hover {
  opacity: 1;
  color: var(--color-accent);
}

nav a:hover::after {
  width: 100%;
}

.lang-toggle {
  background: transparent;
  color: var(--color-nav-text);
  border: 1px solid rgba(0,0,0,0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hero */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: #0a0a0a;
}

#hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.4) 0%,
    rgba(10, 10, 10, 0.2) 50%,
    rgba(10, 10, 10, 0.8) 100%
  );
  z-index: 1;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}

.hero-content {
  z-index: 4;
  padding: 0 1rem;
  position: relative;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  display: block;
}

.hero-tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 500;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

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

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.portfolio-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.portfolio-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  background-color: #000;
}

.portfolio-title {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 8px;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
}

.contact-info ul {
  list-style: none;
  margin-top: 2rem;
}

.contact-info li {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}

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

.social-icon {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--color-accent);
}

/* Footer */
footer {
  background: var(--color-surface);
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4rem;
  text-align: center;
  color: var(--color-text-muted);
}

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



/* Mobile Nav Styles */
.mobile-toggle {
  display: none;
  background: transparent;
  cursor: pointer;
  z-index: 1100;
  padding: 10px;
}

.mobile-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-nav-text);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.nav-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.nav-logo-text span {
  color: var(--color-accent);
}



/* Curtain Animation */
.curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  /* pointer-events: none; - Removed to block clicks while loading */
}

.curtain.is-done {
  pointer-events: none;
}

.curtain-panel {
  width: 50%;
  height: 100%;
  background: #0a0a0a;
  position: relative;
  will-change: transform;
}

.curtain-panel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.curtain-left {
  animation: curtainSlideLeft 1.2s cubic-bezier(0.76, 0, 0.24, 1) 0.3s forwards;
}

.curtain-left::after {
  right: 0;
}

.curtain-right {
  animation: curtainSlideRight 1.2s cubic-bezier(0.76, 0, 0.24, 1) 0.3s forwards;
}

.curtain-right::after {
  left: 0;
}

@keyframes curtainSlideLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes curtainSlideRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .curtain {
    display: none;
  }
}

/* Desktop Layout Adjustment to keep Links Centered */
@media (min-width: 769px) {
  #main-nav {
      flex: 1;
      display: flex;
      justify-content: center; /* Center the nav content */
      align-items: center;
      padding: 0 2rem;
  }
  
  .nav-content {
      display: flex;
      align-items: center;
      width: 100%;
      justify-content: center; /* Center the UL */
      position: relative; /* For absolute positioning of button */
  }

  /* Position Lang Toggle Absolute Right within Nav Content */
  .nav-content .lang-toggle {
      position: absolute;
      right: 0;
      top: 50%;
      transform: translateY(-50%);
  }
}

/* Mobile Nav Overlay */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .mobile-only {
    display: block;
  }
  
  /* .logo .logo-text removed to show text on mobile */

  #main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f4f4f4;
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  #main-nav.active {
    transform: translateX(0);
  }
  
  .nav-content {
      display: flex;
      flex-direction: column;
      height: 100%;
      padding: 2rem;
      position: relative;
  }

  .nav-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 4rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid rgba(0,0,0,0.12);
  }
  
  .nav-close {
      background: none;
      border: none;
      color: var(--color-nav-text);
      font-size: 2.5rem;
      cursor: pointer;
      line-height: 1;
      padding: 0.5rem;
  }

  nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
  }

  nav a {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    width: 100%;
  }
  
  .nav-footer {
      margin-top: auto;
      padding-top: 2rem;
      border-top: 1px solid rgba(0,0,0,0.12);
  }
  
  .social-links-nav {
      display: flex;
      gap: 1.5rem;
  }

  .nav-content > .lang-toggle {
      margin-top: 1.5rem;
      align-self: flex-start;
  }

  
  .social-links-nav a {
      font-size: 1rem;
      text-transform: uppercase;
      letter-spacing: 2px;
      color: #5c5c5c;
  }

  .mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}
