@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Oswald:wght@500;600;700&display=swap');

:root {
  /* Balanced Colors */
  --bg-light: #FFFFFF;
  --surface-light: #F7F7F7;
  --bg-dark: #0A0A0A;
  --surface-dark: #1A1A1A;
  
  --text-dark: #111111;
  --text-muted-dark: #555555;
  --text-light: #FFFFFF;
  --text-muted-light: #AAAAAA;
  
  /* Vibrant Accent */
  --accent: #E53D34; /* Legacy Red adjusted slightly for pop */
  --accent-hover: #C22D25;

  /* Structural Grid */
  --grid-line-light: 1px solid rgba(0, 0, 0, 0.1);
  --grid-line-dark: 1px solid rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-header: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --nav-height: 90px;
  --spacing-lg: 100px;
  --spacing-md: 60px;
  --spacing-sm: 30px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  text-transform: uppercase;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.huge-title {
  font-size: clamp(2rem, 4.8vw, 4.8rem);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 5rem);
  margin-bottom: var(--spacing-sm);
}

.sub-title {
  font-size: clamp(1rem, 2vw, 1.6rem);
  margin-bottom: 12px;
}

.body-large {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  max-width: 800px;
  line-height: 1.6;
}

/* Theme Classes */
.theme-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.theme-dark .body-large,
.theme-dark p {
  color: var(--text-muted-light);
}

.theme-dark .sub-title {
  color: var(--text-light);
}

/* Precision Grid Layouts */
.grid-wrap {
  display: grid;
  border: var(--grid-line-light);
}

.theme-dark .grid-wrap {
  border: var(--grid-line-dark);
}

.grid-cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); }

.grid-item {
  border-right: var(--grid-line-light);
  border-bottom: var(--grid-line-light);
  padding: var(--spacing-md);
  position: relative;
  overflow: hidden;
  transition: background-color 0.4s ease;
}

.theme-dark .grid-item {
  border-right: var(--grid-line-dark);
  border-bottom: var(--grid-line-dark);
}

.grid-item:hover {
  background-color: var(--surface-light);
}

.theme-dark .grid-item:hover {
  background-color: var(--surface-dark);
}

.grid-item.no-border-right { border-right: none; }
.grid-item.no-border-bottom { border-bottom: none; }

/* Asymmetrical Layout specific */
.asym-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border: var(--grid-line-light);
  margin-bottom: var(--spacing-lg);
}

.theme-dark .asym-container { border: var(--grid-line-dark); }

.asym-left {
  padding: var(--spacing-md);
  border-right: var(--grid-line-light);
}

.theme-dark .asym-left { border-right: var(--grid-line-dark); }

.asym-right {
  padding: var(--spacing-md);
  background-color: var(--surface-light);
}

.theme-dark .asym-right, .asym-right.theme-dark { background-color: var(--surface-dark); }

/* Modern Expanding Gallery */
.modern-gallery {
  display: flex;
  width: 100%;
  height: 450px;
  gap: 10px;
  margin-top: var(--spacing-md);
}

.gallery-panel {
  position: relative;
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
  filter: grayscale(0.8) contrast(1.2);
  cursor: pointer;
}

.gallery-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-panel:hover {
  flex: 5;
  filter: grayscale(0) contrast(1);
}

.gallery-panel:hover img {
  transform: scale(1.05);
}

/* Technical UI Elements */
.form-group {
  margin-bottom: var(--spacing-sm);
}

label {
  display: block;
  font-family: var(--font-header);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted-dark);
  margin-bottom: 8px;
}

.theme-dark label, .theme-dark.asym-right label {
  color: var(--text-muted-light);
}

.form-control {
  width: 100%;
  padding: 15px;
  background-color: var(--bg-light);
  border: 1px solid var(--grid-line-light);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.theme-dark .form-control {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.form-control:focus {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-accent {
  background-color: var(--accent);
  color: var(--text-light);
}

.btn-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--text-dark);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

.theme-dark .btn-accent::before { background-color: var(--text-light); }

.btn-accent:hover::before { transform: translateY(0); }

.btn-accent span {
  position: relative;
  z-index: 2;
  transition: color 0.4s ease;
}

.theme-dark .btn-accent:hover span { color: var(--accent); }

.btn-outline {
  background-color: transparent;
  color: var(--text-dark);
  border: 1px solid var(--text-dark);
}

.theme-dark .btn-outline {
  color: var(--text-light);
  border-color: var(--text-light);
}

.btn-outline:hover {
  background-color: var(--text-dark);
  color: var(--bg-light);
}

.theme-dark .btn-outline:hover {
  background-color: var(--text-light);
  color: var(--bg-dark);
}

.btn-call {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 25px 8px 8px;
  border-radius: 50px;
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.btn-call:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.2);
  transform: translateY(-2px);
}
.btn-call .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  animation: pulse-ring 2s infinite;
}
.btn-call svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* Nav */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%; height: var(--nav-height);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.nav-logo-img {
  height: 62px;
  width: auto;
  display: block;
}
footer .nav-logo-img {
  height: 93px;
}

.nav-links {
  display: flex;
  height: 100%;
}

.navbar .container {
  overflow: visible;
}

.nav-links {
  flex-wrap: nowrap;
  overflow: visible;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #fff;
  border-left: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.nav-links a:last-child {
  border-right: 1px solid rgba(255,255,255,0.1);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 3px;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleY(1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  font-family: var(--font-header);
}

/* Nav Dropdown CSS */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-dropdown-trigger {
  height: 100%;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  background-color: var(--bg-dark);
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
  z-index: 1001;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
}

.nav-dropdown-content a {
  display: block !important;
  padding: 15px 20px !important;
  font-family: var(--font-body);
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-left: none !important;
  border-right: none !important;
  width: 100%;
  height: auto !important;
  align-items: center;
}

.nav-dropdown-content a:last-child {
  border-bottom: none;
}

.nav-dropdown-content a::after {
  content: none !important;
}

.nav-dropdown-content a:hover {
  background-color: var(--surface-dark);
  color: var(--accent) !important;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown .nav-dropdown-trigger.active::after {
  transform: scaleY(1);
}


/* Hero Section with Image Background */
.hero {
  padding-top: calc(var(--nav-height) + var(--spacing-lg));
  padding-bottom: var(--spacing-lg);
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.4) grayscale(0.2);
}

.hero-img-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to right, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Section Spacing */
.section { border-bottom: var(--grid-line-light); }
.theme-dark.section { border-bottom: var(--grid-line-dark); }
.section-inner { padding: var(--spacing-lg) 0; }

/* Certifications Strip */
.cert-strip {
  overflow: hidden;
  white-space: nowrap;
  padding: 40px 0;
  background: var(--surface-light);
  border-bottom: var(--grid-line-light);
  width: 100%;
}
.cert-track {
  display: flex;
  width: max-content;
  animation: slide-loop 30s linear infinite;
}
.cert-track:hover {
  animation-play-state: paused;
}
.cert-set {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 120px;
  padding: 0 60px;
}
.cert-logo {
  height: 80px;
  width: auto;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.cert-logo:hover {
  transform: scale(1.05);
}

@keyframes slide-loop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Number Callout */
.num-stat {
  font-family: var(--font-header);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-family: var(--font-header);
  font-size: 1.5rem;
  text-transform: uppercase;
}

/* Footer */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: var(--spacing-md);
}

.footer-col h4 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 1.1rem;
  color: var(--text-muted-light);
}

.footer-links a:hover { color: var(--accent); }

/* Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-line {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.reveal-line span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-line.is-visible span {
  transform: translateY(0);
}

/* Utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }

/* Responsive */
@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .asym-container { grid-template-columns: 1fr; }
  .asym-left { border-right: none; border-bottom: var(--grid-line-light); }
  .theme-dark .asym-left { border-bottom: var(--grid-line-dark); }
  .modern-gallery { height: 350px; }
}

/* Nav responsive - kick in earlier (900px) so all 7 nav items always fit or hamburger */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; width: 100%; height: 0;
    overflow-y: auto;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: flex-start;
    transition: height 0.4s ease;
  }
  .nav-links.active {
    height: calc(100vh - var(--nav-height));
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links a {
    width: 100%; height: 80px;
    border-left: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.5rem;
    padding: 0 40px;
  }
  .nav-links a:last-child { border-right: none; }

  .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: auto;
  }
  .nav-dropdown-trigger {
    width: 100%;
    height: 80px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-dropdown-content {
    display: block !important;
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav-dropdown-content a {
    font-size: 1.1rem !important;
    height: 60px !important;
    padding: 0 40px !important;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }
  .nav-dropdown-content a:last-child {
    border-bottom: none !important;
  }
  .mobile-menu-btn { display: block; }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .grid-item { border-right: none; }
  
  .modern-gallery {
    flex-direction: column;
    height: 800px;
  }
  .gallery-panel { flex: 1; }
  .gallery-panel:hover { flex: 3; }

  /* Mobile Overrides */
  .footer-col {
    border-right: none !important;
    padding: 0 !important;
  }
  .cert-set {
    gap: 40px;
    padding: 0 20px;
  }
  .cert-logo {
    height: 50px;
  }
  .tracking-form {
    flex-direction: column;
    border: none !important;
  }
  .tracking-form input {
    border: var(--grid-line-dark) !important;
    margin-bottom: 10px;
  }
  .tracking-form button {
    border-left: none !important;
    border: var(--grid-line-dark) !important;
  }
}
