/* ==========================================================================
   Home page
   Requires theme.css first. Prefixed .hm- so nothing collides with the
   Bootstrap 3 theme. Bootstrap's own carousel/tab/collapse JS hooks are kept
   intact — only the presentation is replaced.
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */

.hm-hero {
  position: relative;
  background: var(--ims-deep);
}

.hm-slide {
  position: relative;
  min-height: 78vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hm-slide__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15, 28, 38, 0.9) 0%,
    rgba(15, 28, 38, 0.72) 45%,
    rgba(15, 28, 38, 0.4) 100%
  );
}

.hm-slide__inner {
  position: relative;
  max-width: 760px;
  padding-top: 20vh;
  padding-bottom: 15vh;
}

.hm-slide__kicker {
  margin: 0 0 14px;
  font-size: var(--ims-eyebrow-size);
  font-weight: 700;
  letter-spacing: var(--ims-eyebrow-track);
  text-transform: uppercase;
  color: var(--ims-brand);
}

.hm-slide__title {
  margin: 0 0 16px;
  font-size: 50px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.hm-slide__body {
  max-width: 560px;
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ims-ink-invert-soft);
}

.hm-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

/* Carousel chrome — square, quiet, out of the way of the copy */

.hm-hero__dots {
  bottom: 26px;
  left: 50%;
  width: auto;
  margin: 0;
  transform: translateX(-50%);
}

.hm-hero__dots li {
  width: 28px;
  height: 3px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  border-radius: 0;
}

.hm-hero__dots li.active {
  width: 44px;
  height: 3px;
  margin: 0 4px;
  background: var(--ims-brand);
}

.hm-hero__control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  font-size: 26px;
  color: var(--ims-ink-invert);
  background: none;
  opacity: 0.55;
  text-shadow: none;
  transition: opacity 180ms ease;
}

.hm-hero__control:hover,
.hm-hero__control:focus {
  color: var(--ims-ink-invert);
  opacity: 1;
}

/* ---- Contact bar -------------------------------------------------------- */

.hm-bar {
  padding: 20px 0;
  background: var(--ims-ink);
}

.hm-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hm-bar__text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ims-ink-invert);
}

.hm-bar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 0;
}

.hm-bar__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--ims-ink-invert);
}

.hm-bar__link:hover,
.hm-bar__link:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

.hm-bar .ims-btn {
  padding: 11px 22px;
}

/* ---- Shared section header ---------------------------------------------- */

.hm-head {
  max-width: 620px;
  margin: 0 0 44px;
}

.hm-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--ims-gap-md);
  max-width: none;
}

/* ---- Intro + tabs ------------------------------------------------------- */

.hm-intro {
  padding: var(--ims-section) 0;
  background: var(--ims-paper);
}

.hm-intro__body {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ims-ink-soft);
}

.hm-intro__frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.hm-intro__frame {
  margin: 0;
  overflow: hidden;
  background: var(--ims-surface-2);
}

.hm-intro__frame img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.hm-tabs__nav.nav-tabs {
  border-bottom: 1px solid var(--ims-rule);
}

.hm-tabs__nav.nav-tabs > li {
  float: none;
  display: inline-block;
  margin-bottom: -1px;
}

.hm-tabs__nav.nav-tabs > li > a {
  margin: 0;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ims-ink-soft);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.hm-tabs__nav.nav-tabs > li > a:hover,
.hm-tabs__nav.nav-tabs > li > a:focus {
  color: var(--ims-ink);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--ims-rule);
}

.hm-tabs__nav.nav-tabs > li.active > a,
.hm-tabs__nav.nav-tabs > li.active > a:hover,
.hm-tabs__nav.nav-tabs > li.active > a:focus {
  color: var(--ims-brand);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--ims-brand);
}

.hm-tabs__content {
  padding-top: 30px;
}

.hm-point {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ims-rule);
}

.hm-point:last-child {
  border-bottom: 0;
}

.hm-point__icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 17px;
  color: var(--ims-brand);
  border: 1px solid var(--ims-rule);
}

.hm-point__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ims-ink);
}

.hm-point__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ims-ink-soft);
}

/* ---- Stats -------------------------------------------------------------- */

.hm-stats {
  background: var(--ims-brand);
}

.hm-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.22);
}

.hm-stat {
  padding: 46px 24px;
  text-align: center;
  background: var(--ims-brand);
}

.hm-stat__num {
  margin: 0 0 8px;
  font-size: 46px;
  line-height: 1;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.hm-stat__label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* ---- Services ----------------------------------------------------------- */

.hm-services {
  padding: var(--ims-section) 0;
  background: var(--ims-paper);
}

.hm-services__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--ims-gap-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hm-service {
  padding-top: 26px;
  border-top: 2px solid var(--ims-ink);
}

.hm-service__mark img {
  display: block;
  width: 52px;
  height: auto;
  margin-bottom: 18px;
}

.hm-service__title {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
}

.hm-service__title a {
  color: var(--ims-ink);
}

.hm-service__title a:hover,
.hm-service__title a:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

.hm-service__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ims-ink-soft);
}

/* ---- Projects -----------------------------------------------------------
   Grid, cards and filter buttons live in projects.css — both this page and
   /projects use them, so they are defined once.
   ------------------------------------------------------------------------ */

.hm-projects {
  padding: var(--ims-section) 0;
  background: var(--ims-surface);
  border-top: 1px solid var(--ims-rule);
}

.hm-projects__more {
  margin: 20px 0 0;
  text-align: center;
}

/* ---- Why work with us --------------------------------------------------- */

.hm-why {
  padding: var(--ims-section) 0;
  background: var(--ims-paper);
}

.hm-why__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ims-ink-soft);
}

.hm-accordion {
  margin: 0;
}

.hm-accordion__panel.panel {
  margin: 0 0 -1px;
  background: none;
  border: 0;
  border-top: 1px solid var(--ims-rule);
  border-bottom: 1px solid var(--ims-rule);
  border-radius: 0;
  box-shadow: none;
}

.hm-accordion__panel > .panel-heading {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

.hm-accordion__title {
  margin: 0;
  font-size: 17px;
}

.hm-accordion__title > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-weight: 700;
  color: var(--ims-ink);
}

.hm-accordion__title > a:hover,
.hm-accordion__title > a:focus {
  color: var(--ims-brand);
  text-decoration: none;
}

.hm-accordion__chev {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--ims-brand);
  transition: transform 200ms ease;
}

.hm-accordion__title > a.collapsed .hm-accordion__chev {
  transform: rotate(-90deg);
}

.hm-accordion__body.panel-body {
  padding: 0 0 24px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ims-ink-soft);
  border: 0;
}

/* ---- Call to action ----------------------------------------------------- */

.hm-cta {
  padding: 72px 0;
  background: var(--ims-deep);
}

.hm-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ims-gap-lg);
}

.hm-cta__title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.hm-cta__lead {
  margin: 0;
  font-size: 15px;
  color: var(--ims-ink-invert-soft);
}

.hm-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Breakpoints -------------------------------------------------------- */

@media (max-width: 991px) {
  .hm-slide__title { font-size: 38px; }
  .hm-tabs { margin-top: 44px; }
}

@media (max-width: 767px) {
  .hm-slide { min-height: 0; }

  .hm-slide__inner {
    padding-top: 110px;
    padding-bottom: 90px;
  }

  .hm-slide__title { font-size: 28px; }
  .hm-slide__body  { font-size: 15px; }
  .hm-slide__actions .ims-btn { flex: 1 1 auto; text-align: center; }

  .hm-hero__control { width: 40px; font-size: 20px; }

  .hm-bar__inner { justify-content: flex-start; }

  .hm-intro,
  .hm-services,
  .hm-projects,
  .hm-why {
    padding: var(--ims-section-sm) 0;
  }

  .hm-intro__frame img { height: 90px; }

  .hm-stat { padding: 34px 18px; }
  .hm-stat__num { font-size: 36px; }

  .hm-cta { padding: 52px 0; }
  .hm-cta__title { font-size: 21px; }
  .hm-cta__actions .ims-btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-accordion__chev,
  .hm-hero__control {
    transition: none;
  }
}
