/* ===== Global Setup & Variables ===== */
:root {
  --primary: #0b1f36; /* deep navy */
  --accent: #9c7b16; /* royal gold */
  --neutral: #f8f9fa; /* fallback */
  --ink: #1c1c1c;
  --muted: #5c6b7a;
  --border-light: #e9eef5;

  /* Alternative backgrounds */
  --alt1-body: #f5f7fa; /* light navy tint */
  --alt1-section: #eef2f7;

  --alt2-body: #fcfbf7; /* warm ivory */
  --alt2-section: #faf7f0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px; /* Offset for sticky header */
}

/*
      body {
        color: var(--ink);
        background: #fff;
        font-family: "Inter", system-ui, sans-serif;
        line-height: 1.6;
      }
      */
/* === To activate Alternative 1 === */

body {
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  background: var(--alt1-body);
}
.section:nth-of-type(even) {
  background: var(--alt1-section);
}

/* === To activate Alternative 2 === */
/*
      body {
        background: var(--alt2-body);
      }
      .section:nth-of-type(even) {
        background: var(--alt2-section);
      }
      */
h1,
h2,
h3 {
  font-family: "Libre Baskerville", serif;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.15;
}
h2 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
}
h3 {
  font-size: clamp(1rem, 2vw, 1.2rem);
}
p,
li {
  font-size: clamp(0.9375rem, 1.2vw, 1.125rem);
}

.container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section {
  padding: 64px 0;
}

/* Section titles: centered + gold underline */
.section > .container > h2 {
  display: block; /* was inline-block */
  text-align: center; /* force center */
  margin-inline: auto; /* ensure centering in all LTR/RTL */
  padding-bottom: 0.35rem;
  position: relative;
}
.section > .container > h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn {
  position: relative;
  background: linear-gradient(180deg, #a48829, var(--accent));
  box-shadow:
    0 6px 16px rgba(156, 123, 22, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 20px rgba(156, 123, 22, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  filter: brightness(1.02);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(156, 123, 22, 0.22);
}

/* Mobile-first menu defaults */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 44px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(11, 31, 54, 0.06);
}

/* Mobile menu panel (hidden by default) */
.menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 16px 30px rgba(11, 31, 54, 0.08);
  display: none; /* hidden until open */
  padding: 10px 20px;
}
.menu a {
  display: block;
  padding: 12px 4px;
  margin: 0; /* override desktop margin-left */
  font-weight: 600;
}

/* When open */
.menu.is-open {
  display: block;
}

/* Desktop layout */
@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }
  .header .container {
    position: relative;
  }
  .menu {
    position: static;
    display: block; /* always visible on desktop */
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .menu a {
    display: inline-block;
    margin-left: 18px;
    font-weight: 500;
  }
}

@media (max-width: 979px) {
  .menu {
    backdrop-filter: blur(6px) saturate(110%);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
    background: rgba(255, 255, 255, 0.92);
  }
}

/* Slightly stronger sticky header shadow when menu is open on mobile */
.header.elevated {
  box-shadow: 0 8px 24px rgba(11, 31, 54, 0.08);
}
/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  padding: 10px 0;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header .brand img {
  height: 40px;
  display: block;
}

.header .menu a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 500;
}

html {
  scroll-behavior: smooth;
}
/* ===== Hero Section ===== */
#hero {
  position: relative;
  max-width: 1140px; /* Add: Sets the maximum width */
  margin: 32px auto; /* Add: Centers the section and adds vertical space */
  border-radius: 16px; /* Add: Rounds the corners for a polished look */
  overflow: hidden; /* Add: Ensures the image respects the rounded corners */
  height: 50vh; /* Adjust: A slightly smaller height often works better for a boxed layout */
  min-height: 400px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding: 0;
}

#hero .background {
  position: absolute;
  inset: 0;
  z-index: -2;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

#hero .overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 31, 54, 0.6), rgba(11, 31, 54, 0.3));
}

#hero h1,
#hero p {
  color: #fff;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
}

#hero .btn {
  margin-top: 1rem;
}

.hero {
  position: relative;
  min-height: 56vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.05) contrast(1.05) brightness(0.98);
}

/* Glass panel for hero text */
.glass {
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 10px 30px rgba(11, 31, 54, 0.25);
}
.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 31, 54, 0.55), rgba(11, 31, 54, 0.15));
  z-index: -1;
}
.hero .content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  text-align: center;
  padding: 24px;
}
.hero h1,
.hero p {
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}
/* ===== Services & Industries Sections ===== */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  padding: 24px;
  border: 1px solid var(--border-light);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(11, 31, 54, 0.06);
}

.card,
.cs-card {
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 18px rgba(11, 31, 54, 0.06);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.card:hover,
.cs-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11, 31, 54, 0.1);
  border-color: #dde6f1;
}

.card .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}
/* Horizontal card layout */
.card-horizontal {
  display: flex;
  align-items: stretch;
  margin-bottom: 24px;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-media-wrap {
  flex: 0 0 40%; /* image takes ~40% of width */
  max-width: 40%;
  overflow: hidden;
}

.card-media-wrap img.card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-body .title {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.card-body .excerpt {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.card-body .meta-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive adjustment: stack vertically on small screens */
@media (max-width: 768px) {
  .card-horizontal {
    flex-direction: column;
  }
  .card-media-wrap {
    max-width: 100%;
    flex: none;
  }
}

.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(233, 238, 245, 0.9);
}
/* Carousel */
.carousel {
  position: relative;
  margin-top: 18px;
}

/* Make carousel buttons float */
#cs-carousel .controls {
  position: relative;
  z-index: 2;
  margin-top: 14px;
}
#cs-carousel .btn {
  padding: 10px 16px;
}
.viewport {
  overflow: hidden;
}
.track {
  display: flex;
  transition: transform 0.45s ease;
}
.slide {
  flex: 0 0 calc(100% / var(--visible, 1));
  padding: 12px;
}

/* Responsive visible count: 1 / 2 / 3 */
@media (min-width: 760px) {
  :root {
    --visible: 2;
  }
}
@media (min-width: 1100px) {
  :root {
    --visible: 3;
  }
}

.cs-card {
  height: 100%;
  cursor: pointer;
  border: 1px solid #e9eef5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 31, 54, 0.05);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}
.cs-top h3 {
  margin-top: 8px;
}
.linkish {
  color: var(--accent);
  font-weight: 600;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000;
}
.modal[aria-hidden="false"] {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.label {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.case-section {
  margin-top: 10px;
}

/* ===== Contact Section ===== */
#contact form {
  max-width: 600px;
  margin: 24px auto 0;
  display: grid;
  gap: 16px;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
}

#contact textarea {
  min-height: 120px;
}
#contact .btn {
  width: 100%;
}

/* Legal layers */
.layer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1100;
}
.layer[aria-hidden="false"] {
  display: block;
}
.layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.layer-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 6vh auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

/* Modal scrolling (desktop + iOS) */
.layer {
  padding: 12px;
} /* a little breathing room on small screens */
.layer-content {
  max-height: 85vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  overscroll-behavior: contain; /* prevent bounce into background */
}
@media (max-width: 600px) {
  .layer-content {
    margin: 4vh auto;
    max-height: 92vh;
    padding: 20px;
    border-radius: 12px;
  }
}
.layer-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}

/* Keep this one, remove the earlier simpler .pill rule above it */
.pill {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(180deg, #ffffff, #f2f5f9);
  border: 1px solid #e6edf5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

:focus-visible {
  outline: 2px solid rgba(156, 123, 22, 0.6);
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .track,
  .btn,
  .card,
  .cs-card {
    transition: none !important;
  }
  .hero-video {
    animation: none;
  }
}

footer {
  background: var(--alt1-section); /* soft navy wash from your palette */
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
  margin-top: 32px; /* breathing room above footer */
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
footer small {
  color: var(--muted);
}

/* Legal modal typography */
.layer-content .legal {
  font-size: 0.95rem; /* smaller than site body */
  line-height: 1.65;
  color: var(--ink);
}
.layer-content .legal h2,
.layer-content .legal h3 {
  font-family: "Libre Baskerville", serif;
  color: var(--primary);
  margin: 0 0 0.5rem;
}
.layer-content .legal h2 {
  font-size: clamp(22px, 3vw, 28px);
}
.layer-content .legal h3 {
  font-size: clamp(16px, 2vw, 20px);
  margin-top: 1.2rem;
}
.layer-content .legal p {
  margin: 0.5rem 0;
}
.layer-content .legal ul {
  padding-left: 1.25rem;
  margin: 0.25rem 0 0.75rem;
}
.layer-content .legal li {
  margin: 0.25rem 0;
}
.layer-content .legal a {
  color: var(--primary);
  text-decoration: underline;
}
