/* --- General Setup & Variables --- */
:root {
    /* The final, locked-in color palette */
  --color-darkest: hsl(212, 43%, 6%);
  --color-dark: hsl(212, 43%, 10%);
  --color-mid: hsl(212, 43%, 18%);
  --color-brand: hsl(212, 43%, 36%);
  --color-text: hsl(212, 28%, 70%);

    /* RGB Components for RGBA() */
  --color-dark-rgb: 13, 27, 42;
  --color-mid-rgb: 27, 38, 59;

    /* Static Variables */
  --text-light: #f5f5f5;
  --text-muted: var(--color-text);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', sans-serif;
  --header-height: 70px;
  --hero-bg-anim-duration: 20s;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background-color: var(--color-dark);
  color: var(--text-light);
  line-height: 1.7;
}
body.nav-open {
  overflow: hidden;
}
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 1rem;
}
h1 {
  font-size: 3rem;
  line-height: 1.2;
}
h2 {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 3rem;
}
h3 {
  font-size: 1.5rem;
}
section {
  padding: 6rem 0;
  position: relative;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header & Navigation --- */
.main-header {
  background-color: rgba(var(--color-dark-rgb), 0.8);
  backdrop-filter: blur(10px);
  padding: 0;
  height: var(--header-height);
  position: fixed;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
}
.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
}
.main-nav li {
  margin-left: 2rem;
}
.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}
.main-nav a:hover {
  color: var(--color-brand);
}
.cta-button-nav {
  background-color: var(--color-brand);
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.cta-button-nav:hover {
  filter: brightness(0.85);
  color: white !important;
}

/* --- Mobile Navigation & Hamburger --- */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 1001;
}

/* --- Hero Section --- */
.hero-section {
  background: none;
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: var(--header-height);
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(var(--color-dark-rgb), 0.85), rgba(var(--color-dark-rgb), 0.85)), url('images/hero-background.jpg');
  background-size: cover;
  background-position: center;
  z-index: -1;
  animation: subtleZoom var(--hero-bg-anim-duration) ease-in-out infinite;
}
.hero-section .container {
  max-width: 800px;
  position: relative;
  z-index: 10;
}
.hero-section h1 {
  font-size: 3.5rem;
}
.hero-section p {
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 2rem;
}
.cta-button {
  background-color: var(--color-brand);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
  filter: brightness(0.85);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- Section Backgrounds using Pseudo-elements --- */
.services-section,
.about-section,
.contact-section {
  background-color: transparent;
  overflow: hidden;
}
.services-section::before,
.about-section::before,
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  z-index: -1;
}
.services-section::before {
  background-image: linear-gradient(rgba(var(--color-mid-rgb), 0.95), rgba(var(--color-mid-rgb), 0.95)), url('images/services-bg.jpg');
}
.about-section::before {
  background-image: linear-gradient(rgba(var(--color-dark-rgb), 0.95), rgba(var(--color-dark-rgb), 0.95)), url('images/about-bg.jpg');
}
.contact-section::before {
  background-image: linear-gradient(rgba(var(--color-mid-rgb), 0.95), rgba(var(--color-mid-rgb), 0.95)), url('images/contact-bg.jpg');
}

/* --- Services Section --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.service-card {
  background-color: rgba(var(--color-dark-rgb), 0.7);
  backdrop-filter: blur(5px);
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: 8px;
  border-left: 3px solid var(--color-brand);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.service-card i {
  font-size: 3rem;
  color: var(--color-brand);
  margin-bottom: 1.5rem;
}

/* --- About & Contact Sections (styles already covered) --- */
.about-flex {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.about-image {
  flex-basis: 40%;
}
.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.about-text {
  flex-basis: 60%;
}
.contact-section h2,
.contact-section p {
  text-align: center;
}
.contact-section p {
  max-width: 600px;
  margin: 0 auto 3rem;
}
.contact-form {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.form-group {
  flex: 1 1 48%;
}
.form-group.full-width {
  flex-basis: 100%;
}
input,
select,
textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--color-dark);
  border: 1px solid var(--color-mid);
  border-radius: 5px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-brand);
}
#form-status {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  font-weight: 600;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--color-darkest);
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Responsive Media Query --- */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  .about-flex {
    flex-direction: column;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100vh;
    background-color: var(--color-dark);
    padding-top: 5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .main-nav li {
    margin-left: 0;
  }
  .main-nav a {
    font-size: 1.2rem;
  }
}
@keyframes subtleZoom {
  0% {
    transform: scale(1.0);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1.0);
  }
}
