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

html {
  scroll-behavior: smooth;
}

:root {
  --waltham-blue: #6cb1d3;
  --waltham-gray: #576b79;
  --dark: #2d2d2d;
  --text-muted: rgba(87, 107, 121, 0.75);
  --light-bg: rgba(108, 177, 211, 0.08);
  --border-blue: rgba(108, 177, 211, 0.35);
  --border-blue-half: rgba(108, 177, 211, 0.5);
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
}

/* ===== Reusable Layout ===== */

/* Section wrapper — consistent vertical padding */
.section {
  padding: 128px 24px;
}

.section--light {
  background-color: var(--light-bg);
}

.section--gray {
  background-color: var(--waltham-gray);
}

/* Centered column container */
.section-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.section-inner--center {
  align-items: center;
}

.section-inner--lg-gap {
  gap: 128px;
}

/* Two-column split */
.split-row {
  display: flex;
  gap: 96px;
  align-items: center;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.split-row--stretch {
  align-items: stretch;
}

/* Image on the left, text on the right — text stays first in the DOM so it
   still leads once the row stacks to a column below 1024px. */
.split-row--reverse {
  flex-direction: row-reverse;
}

/* Flex text column in a split */
.split-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Absolute-fill image panel */
.cover-image {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.cover-image picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section titles */
.section-titles {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.section-titles--left {
  text-align: left;
}

.section-label {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--waltham-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section-heading {
  font-family: 'PT Sans', sans-serif;
  font-size: 48px;
  line-height: 64px;
  letter-spacing: 1px;
  color: var(--dark);
}

.section-desc {
  font-size: 16px;
  line-height: 28px;
  color: var(--waltham-gray);
  letter-spacing: 0.25px;
  max-width: 920px;
  margin: 0 auto;
}

.section--gray .section-heading {
  color: var(--white);
}

/* Body text */
.body-text {
  font-size: 16px;
  line-height: 28px;
  color: var(--waltham-gray);
  letter-spacing: 0.25px;
}

.body-text--white {
  color: var(--white);
}

/* Card grid */
.card-grid {
  display: flex;
  gap: 24px;
  width: 100%;
}

/* 40 px icon */
.icon-md {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Horizontal icon + text row */
.icon-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 128px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.3s ease, height 0.3s ease, background-color 0.3s ease;
}

.navbar--scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
  padding: 0 24px;
}

.navbar-logo {
  flex-shrink: 0;
  display: flex;
}

.navbar-logo img,
.navbar-logo svg {
  display: block;
  height: 64px;
  width: auto;
  object-fit: contain;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 64px;
}

.navbar-links a,
.navbar-links .nav-item {
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--waltham-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.3s;
}

.navbar-links a:hover,
.navbar-links .nav-item:hover {
  color: var(--waltham-blue);
}

/* Override nav link styles for the CTA button */
.navbar-links .btn-primary {
  color: var(--white);
  font-weight: 700;
}

.navbar-links .btn-primary:hover {
  color: var(--white);
  background-color: #465862;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
}

.nav-item .arrow {
  width: 10px;
  height: 5px;
  object-fit: contain;
  transition: transform 0.3s;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* ===== Nav Dropdown ===== */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 0;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 224px;
  background: var(--white);
  border-top: 2px solid var(--waltham-blue);
  box-shadow: 0 12px 32px rgba(45, 45, 45, 0.12);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 10;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.navbar-links .nav-dropdown-menu a {
  padding: 14px 24px;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(108, 177, 211, 0.12);
}

.navbar-links .nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.navbar-links .nav-dropdown-menu a:hover {
  background-color: var(--light-bg);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  background-color: var(--waltham-gray);
  color: var(--white);
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 28px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #465862;
}

.btn-primary-lg {
  padding: 12px 32px;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  background: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--waltham-gray);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s;
  transform-origin: center;
}

/* Hidden by default — activated within 1024px media query */
.mobile-overlay {
  display: none;
}

/* ===== Hero Section ===== */
.hero {
  display: flex;
  background-color: var(--light-bg);
  min-height: 800px;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 64px 0 64px 48px;
}

.hero-inner {
  max-width: 700px;
  width: 100%;
  padding-right: 128px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero-inner .hero-text-container {
display: flex;
flex-direction: column;
gap: 1rem;
}

.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-subtitle::before {
  content: '';
  width: 24px;
  height: 2px;
  background-color: var(--waltham-blue);
  flex-shrink: 0;
}

.hero-subtitle span {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--waltham-blue);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title {
  font-family: 'PT Sans', sans-serif;
  font-size: 72px;
  line-height: 72px;
  letter-spacing: 1px;
  color: var(--dark);
}

.hero-title .italic {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-style: italic;
  color: var(--waltham-blue);
}

.hero-body .highlight {
  font-weight: 700;
  color: var(--waltham-blue);
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--waltham-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.3s;
}

.btn-text:hover {
  color: var(--waltham-blue);
}

.btn-text .arrow-right {
  width: 13px;
  height: 8px;
  object-fit: contain;
  transition: transform 0.3s;
}

.btn-text:hover .arrow-right {
  transform: translateX(4px);
}

.hero-image {
  flex: 1;
  position: relative;
  min-height: 800px;
  overflow: hidden;
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 20, 0.25) 0%,
    rgba(20, 20, 20, 0) 50%,
    rgba(20, 20, 20, 0.25) 100%
  );
}

/* ===== Above-the-fold Responsive ===== */
@media (max-width: 1400px) {
  .navbar-links {
    gap: 40px;
  }
}

@media (max-width: 1200px) {
  .navbar-links {
    gap: 32px;
  }

  .hero-inner {
    padding-right: 64px;
  }

  .hero-title {
    font-size: 56px;
    line-height: 56px;
  }

  .split-row {
    gap: 48px;
  }
}

@media (max-width: 1024px) {
  /* --- Premium Mobile Nav Drawer --- */
  .navbar {
    height: 72px;
    z-index: 1000;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.12);
    z-index: 200;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    visibility: hidden;
  }

  .navbar-links.active {
    transform: translateX(0);
    visibility: visible;
  }

  /* Drawer header: the logo sits at the left, the close button at the right. */
  .navbar-links::before {
    content: '';
    display: block;
    width: 100%;
    height: 72px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(108, 177, 211, 0.15);
    background-image: url('../img/navbar-logo.svg');
    background-repeat: no-repeat;
    background-position: 24px center;
    background-size: 193px 52px;
  }

  /* The navbar is opaque and sits above the drawer, so it would otherwise hide
     that header. Drop its background while the drawer is open — it keeps its
     z-index, which is what keeps the close button clickable above the drawer. */
  body.menu-open .navbar {
    background-color: transparent;
    box-shadow: none;
  }

  body.menu-open .navbar-logo {
    opacity: 0;
    pointer-events: none;
  }

  /* Nav items styling */
  .navbar-links a,
  .navbar-links .nav-item {
    padding: 20px 32px;
    font-size: 14px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(108, 177, 211, 0.08);
    transition: background-color 0.2s, color 0.2s;
  }

  .navbar-links a:active,
  .navbar-links .nav-item:active {
    background-color: var(--light-bg);
  }

  /* Dropdown becomes an in-drawer accordion */
  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }

  .navbar-links .nav-dropdown > .nav-item {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: var(--light-bg);
    border-top: none;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    transform: none;
    max-height: 0;
  }

  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown.open:hover .nav-dropdown-menu,
  .nav-dropdown.open:focus-within .nav-dropdown-menu {
    transform: none;
    max-height: 360px;
  }

  .navbar-links .nav-dropdown-menu a {
    padding: 16px 48px;
    font-size: 13px;
    white-space: normal;
    border-bottom: 1px solid rgba(108, 177, 211, 0.12);
  }

  .nav-item:hover .arrow {
    transform: none;
  }

  .nav-dropdown.open > .nav-item .arrow {
    transform: rotate(180deg);
  }

  /* "Get a Quote" CTA in drawer */
  .navbar-links .btn-primary {
    margin: 24px 32px;
    padding: 14px 24px;
    text-align: center;
    justify-content: center;
    font-size: 13px;
    letter-spacing: 1.5px;
  }

  .mobile-menu-toggle {
    display: flex;
    z-index: 300;
  }

  /* Park the close button on the drawer's right edge, so the drawer header
     reads logo-then-close rather than close-at-the-far-side-of-the-screen. */
  .mobile-menu-toggle.active {
    position: fixed;
    top: 18px;
    left: calc(min(100vw, 360px) - 58px);
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Overlay with backdrop blur */
  .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(45, 45, 45, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.4s;
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* --- Hero tablet --- */
  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-content {
    align-items: center;
    text-align: center;
    padding: 40px 24px;
  }

  .hero-inner {
    padding-right: 0;
    max-width: 100%;
    align-items: center;
  }

  .hero-subtitle::before {
    display: none;
  }

  .hero-subtitle {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-buttons .btn-text {
    justify-content: center;
  }

  .hero-image {
    min-height: 400px;
    width: 100%;
  }

  /* --- Layout adjustments --- */
  .section {
    padding: 64px 24px;
  }

  .section-inner {
    gap: 32px;
  }

  .split-row {
    flex-direction: column;
    gap: 32px;
  }

  .split-text {
    gap: 32px;
  }

  .cover-image {
    width: 100%;
  }

  .cover-image picture {
    position: relative;
    display: block;
  }

  .cover-image img {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .section-inner--lg-gap {
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .section-heading {
    font-size: 32px;
    line-height: 42px;
  }

  .section-desc {
    font-size: 15px;
    line-height: 26px;
  }

  .section {
    padding: 48px 20px;
  }

  .hero-title {
    font-size: 44px;
    line-height: 48px;
  }

  .hero-content {
    padding: 32px 20px;
  }

  .card-grid {
    flex-direction: column;
  }

  .section-inner {
    gap: 24px;
  }

  .section-inner--lg-gap {
    gap: 40px;
  }

  .split-row {
    gap: 24px;
  }

  .split-text {
    gap: 24px;
  }

  .body-text {
    font-size: 15px;
    line-height: 26px;
  }

  .navbar-logo img,
  .navbar-logo svg {
    height: 52px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 16px;
  }

  .section-heading {
    font-size: 26px;
    line-height: 34px;
  }

  .section-desc {
    font-size: 14px;
    line-height: 24px;
  }

  .section-inner {
    gap: 20px;
  }

  .section-inner--lg-gap {
    gap: 32px;
  }

  .hero-title {
    font-size: 32px;
    line-height: 36px;
  }

  .hero-inner {
    gap: 24px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .hero-buttons .btn-primary {
    text-align: center;
    justify-content: center;
  }

  .hero-content {
    padding: 32px 16px;
  }

  .hero-image {
    min-height: 300px;
  }

  .split-row {
    gap: 20px;
  }

  .split-text {
    gap: 20px;
  }

  .body-text {
    font-size: 14px;
    line-height: 24px;
  }

  .navbar-logo img,
  .navbar-logo svg {
    height: 48px;
  }

  .navbar {
    height: 64px;
  }

  .navbar-content {
    padding: 0 16px;
  }
}
