/* XPACIA Group – design-led architecture. No Bootstrap. */

:root {
  /* Main palette: gray + deep olive green (client-approved) */
  --olive-deep: #354a24;
  --olive: #4a5d3a;
  --olive-light: #5a7045;
  --gray-dark: #2d2d2d;
  --gray: #4a4a4a;
  --gray-mid: #6b6b6b;
  --gray-light: #d4d4d4;
  --gray-pale: #e8e8e8;
  --gray-white: #f5f5f5;
  --section-alt: #ebebeb;
  --container: 1100px;
  --prose-max: 720px;
  --gap: 24px;
  --radius: 12px;
  --shadow: 0 10px 24px rgba(45, 45, 45, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchor targets: clear sticky header when scrolling from nav */
main section[id] {
  scroll-margin-top: 72px;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  line-height: 1.6;
}

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

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

/* Container */
.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  top: -44px;
  left: 16px;
  background: var(--olive-deep);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Header & nav */
.site-header {
  position: sticky;
  top: 0;
  background-color: var(--gray-white);
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.15);
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 12px 0;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--olive-deep);
}
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-nav a {
  font-size: 0.95rem;
  color: var(--gray-dark);
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a:focus {
  color: var(--olive-deep);
}
.site-nav a {
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--olive-deep);
  transition: width 0.2s ease;
}
.site-nav a:hover::after,
.site-nav a:focus::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px 0;
  background: var(--gray-dark);
}

/* Hero carousel */
.hero-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-carousel .carousel-inner {
  position: relative;
  width: 100%;
}
.hero-carousel .carousel-item {
  display: none;
  width: 100%;
}
.hero-carousel .carousel-item.active {
  display: block;
}
.hero-carousel .carousel-item img {
  width: 100%;
  height: 80vh;
  object-fit: cover;
  vertical-align: middle;
}
.hero-carousel .carousel-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 32px, var(--prose-max));
  padding: 24px;
  background-color: rgba(53, 74, 36, 0.9);
  color: #fff;
  border-radius: 10px;
  text-align: center;
}
.hero-carousel .carousel-caption h1 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #fff;
}
.hero-carousel .carousel-caption p {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}
.hero-carousel .carousel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.hero-carousel .carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-carousel .carousel-indicators li {
  list-style: none;
}
.hero-carousel .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
}
.hero-carousel .carousel-indicators button.active {
  background: #fff;
}
.hero-carousel .carousel-prev,
.hero-carousel .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.hero-carousel .carousel-prev:hover,
.hero-carousel .carousel-next:hover {
  background: rgba(0, 0, 0, 0.6);
}
.hero-carousel .carousel-prev:focus-visible,
.hero-carousel .carousel-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}
.hero-carousel .carousel-prev { left: 16px; }
.hero-carousel .carousel-next { right: 16px; }

@media (max-width: 768px) {
  .hero-carousel .carousel-item img {
    height: 52vh;
  }
  .hero-carousel .carousel-caption {
    position: static;
    transform: none;
    width: 100%;
    border-radius: 0;
    padding: 16px;
    text-align: left;
    background-color: var(--olive-deep);
  }
  .hero-carousel .carousel-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-carousel .carousel-actions .btn {
    width: 100%;
    text-align: center;
  }
  .hero-carousel .carousel-indicators {
    bottom: 8px;
  }
}

/* Sections */
.section {
  padding: 60px 0;
}
main .section:nth-of-type(odd) {
  background-color: var(--gray-white);
}
main .section:nth-of-type(even) {
  background-color: var(--section-alt);
}
main .section + .section {
  border-top: 1px solid rgba(45, 45, 45, 0.06);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--olive-deep);
  margin: 0 0 0.75rem;
}
.section-intro {
  max-width: var(--prose-max);
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--gray);
}
.text-center {
  text-align: center;
}
.section .text-center.section-title { display: block; }
.section .text-center.section-intro { display: block; }

/* Constrained prose block (e.g. About body text) */
.section-body {
  max-width: var(--prose-max);
  margin: 0 auto;
}
.section-body p {
  margin: 0 0 1rem;
  color: var(--gray-dark);
}
.section-body p:last-child {
  margin-bottom: 0;
}

/* Card grid (3 columns for Core Approach) */
.card-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 24px;
}
.card {
  background: var(--gray-white);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 14px 28px rgba(45, 45, 45, 0.15);
  transform: translateY(-2px);
}
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--olive-deep);
  margin: 0 0 8px;
}
.card-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.5;
}

/* Services: same grid, 5 cards */
.services-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 24px;
}
.services-grid .card:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 520px;
}

@media (min-width: 700px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .services-grid {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background-color: var(--olive-deep);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--olive);
  color: #fff;
}
.btn-secondary {
  background-color: var(--gray-dark);
  color: var(--gray-white);
}
.btn-secondary:hover {
  background-color: var(--gray);
  color: var(--gray-white);
}
.btn-success {
  background-color: var(--olive);
  color: #fff;
}
.btn-success:hover {
  background-color: var(--olive-deep);
  color: #fff;
}
.me-2 { margin-right: 8px; }

/* Services section: faded background image (horizontal/cover) */
#services {
  position: relative;
  overflow: hidden;
}
#services::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/background theme for about or services.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.18;
  z-index: 0;
}
#services .container {
  position: relative;
  z-index: 1;
}

/* About section */
#about .section-body {
  text-align: center;
}
#about .section-body p {
  text-align: center;
}
#about h3 {
  font-size: 1.25rem;
  color: var(--olive-deep);
  margin: 1.5rem 0 0.5rem;
}
#about p:not(.section-intro):not(.text-center) {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 0 auto;
}
.form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-dark);
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--gray-white);
  color: var(--gray-dark);
}
.form-control:focus {
  outline: none;
  border-color: var(--olive-deep);
  box-shadow: 0 0 0 2px rgba(53, 74, 36, 0.2);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
.form-actions {
  text-align: center;
  margin-top: 24px;
}
.form-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--gray);
  min-height: 1.25em;
}
.form-status.is-error {
  color: #c00;
}

/* Footer */
.site-footer {
  background-color: var(--olive-deep);
  color: var(--gray-white);
  padding: 48px 0;
  text-align: center;
  border-top: 4px solid var(--olive);
}
.site-footer p {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: rgba(245, 245, 245, 0.95);
}
.site-footer p:last-child {
  margin-bottom: 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: var(--gray-white);
    border-top: 1px solid var(--gray-pale);
    box-shadow: 0 8px 16px rgba(45, 45, 45, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.25s ease;
  }
  .site-nav a {
    padding: 12px 0;
    font-size: 1rem;
  }
  .site-nav.is-open {
    max-height: 280px;
    opacity: 1;
    pointer-events: auto;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 40px 0;
  }
  .hero-carousel .carousel-prev,
  .hero-carousel .carousel-next {
    display: none;
  }
  .me-2 {
    margin-right: 0;
    margin-bottom: 10px;
  }
  #cta .btn {
    width: 100%;
    text-align: center;
  }
}
