

:root {
  --hm-navy-900: #081B33;
  --hm-navy-800: #0C2748;
  --hm-navy-700: #133A6B;
  --hm-navy-600: #1B4E8E;
  --hm-gold:     #DB9E1D;
  --hm-gold-400: #EFBA4A;
  --hm-hero-h:   clamp(440px, 62vh, 600px);
}

/* --------------------------------------------------------------------------
   1. Hero — full-bleed navy stage with a bleeding photo panel
   -------------------------------------------------------------------------- */
.hm-hero {
  position: relative;
  background: var(--hm-navy-800);
  overflow: hidden;
  isolation: isolate;
}

/* Faint survey grid across the whole stage */
.hm-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(100deg, #000 0%, #000 46%, transparent 72%);
  -webkit-mask-image: linear-gradient(100deg, #000 0%, #000 46%, transparent 72%);
  pointer-events: none;
}

.hm-hero .carousel,
.hm-hero .carousel-inner { position: static; }

/* Every slide sits in the same grid cell, so the stage keeps one height —
   the tallest slide — and never resizes between transitions. */
.hm-hero .carousel-inner { display: grid; }

.hm-hero .carousel-item {
  grid-area: 1 / 1;
  display: flex;              /* overrides Bootstrap's display: none */
  align-items: center;
  min-height: var(--hm-hero-h);
}

/* Inactive slides still reserve their height, but stay out of the tab order
   and the accessibility tree. */
.hm-hero .carousel-item:not(.active):not(.carousel-item-next):not(.carousel-item-prev) {
  visibility: hidden;
}

.hm-hero .carousel-fade .carousel-item { transition: opacity .7s ease; }

/* The photo panel bleeds off the right edge behind an angled navy wash */
.hm-hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 58%;
  z-index: -1;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 6% 100%);
}
.hm-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hm-hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--hm-navy-800) 0%, rgba(12, 39, 72, 0.06) 26%, rgba(12, 39, 72, 0.12) 62%, rgba(12, 39, 72, 0) 100%);
}

/* Slide copy */
.hm-hero-inner {
  position: relative; z-index: 2; width: 100%;
  padding-block: clamp(40px, 2vw, 64px) clamp(108px, 2vw, 142px);
}
.hm-hero-copy { max-width: 620px; }

.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: .74rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--hm-gold-400);
  margin-bottom: 16px;
}
.hm-eyebrow::before { content: ""; width: 30px; height: 2px; background: var(--hm-gold); }

.hm-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 3.8vw, 3.05rem);
  line-height: 1.1;
  margin-bottom: 14px;
  text-wrap: balance;
}
.hm-hero h1 b { color: var(--hm-gold); font-weight: 800; }

.hm-hero-lead {
  color: rgba(255, 255, 255, .8);
  font-size: 1.02rem;
  max-width: 52ch;
  margin-bottom: 24px;
}

.hm-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero facts strip */
.hm-hero-facts {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hm-fact { display: flex; align-items: center; gap: 12px; }
.hm-fact b {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.55rem; line-height: 1; color: var(--hm-gold);
}
.hm-fact span { color: rgba(255, 255, 255, .72); font-size: .92rem; line-height: 1.35; max-width: 22ch; }

/* Carousel chrome docked to the bottom-left of the stage */
.hm-hero-chrome {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: clamp(40px, 6.8vw, 12px);
  pointer-events: none;
}
.hm-hero-chrome .container {
  display: flex; align-items: center; gap: 22px;
  pointer-events: none;
}
.hm-hero-chrome > .container > * { pointer-events: auto; }

/* Bootstrap positions .carousel-indicators absolutely and gives the buttons
   transparent 10px borders — both are reset here so the bars can live inside
   the chrome row. */
.hm-hero-chrome .carousel-indicators {
  position: static; z-index: auto;
  display: flex; justify-content: flex-start;
  margin: 0; padding: 0; list-style: none;
}
.hm-dots { gap: 10px; }
.hm-dots button[data-bs-target] {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 56px; height: 4px;
  margin: 0; padding: 0;
  border: 0; border-radius: 3px;
  text-indent: 0; opacity: 1;
  background-color: rgba(255, 255, 255, .22);
  background-clip: border-box;
  position: relative; overflow: hidden;
  transition: background-color .3s ease;
}
.hm-dots button::after {
  content: ""; position: absolute; inset: 0;
  background: var(--hm-gold);
  transform: scaleX(0); transform-origin: left;
}
.hm-dots button.active::after { animation: hm-tick 7s linear forwards; }
@keyframes hm-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hm-arrows { display: flex; gap: 8px; }
.hm-arrows button {
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.hm-arrows button:hover { background: var(--hm-gold); border-color: var(--hm-gold); color: var(--hm-navy-900); }

/* --------------------------------------------------------------------------
   2. Credentials bar — floats over the hero/section seam
   -------------------------------------------------------------------------- */
.hm-creds { position: relative; z-index: 5; margin-top: calc(-1 * clamp(38px, 4.2vw, 52px)); }
.hm-creds-card {
  background: var(--hm-navy-900);
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 60px rgba(8, 27, 51, .34);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}
.hm-cred {
  padding: 24px 24px;
  display: flex; align-items: center; gap: 16px;
  border-left: 1px solid rgba(255, 255, 255, .1);
}
.hm-cred:first-child { border-left: 0; }
.hm-cred-icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(219, 158, 29, .14); color: var(--hm-gold);
}
.hm-cred-value {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.5rem; line-height: 1.1; color: #fff;
  font-variant-numeric: tabular-nums;
}
.hm-cred-label { color: rgba(255, 255, 255, .66); font-size: .86rem; margin: 2px 0 0; line-height: 1.3; }

/* --------------------------------------------------------------------------
   3. Small shared home pieces
   -------------------------------------------------------------------------- */
.hm-section-top { padding-top: clamp(72px, 8vw, 118px); }

/* Callout bar under the services grid */
.hm-callout {
  margin-top: 34px;
  background: linear-gradient(120deg, var(--hm-navy-800), var(--hm-navy-700));
  border-radius: var(--radius);
  padding: 26px 30px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
}
.hm-callout h3 { color: #fff; font-size: 1.18rem; margin: 0 0 4px; }
.hm-callout p { color: rgba(255, 255, 255, .74); margin: 0; font-size: .95rem; }
.hm-callout .btn { flex: 0 0 auto; }

/* Split header for the dark "why" band */
.hm-why-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 1.55fr; gap: clamp(32px, 4vw, 64px); align-items: start; }
.hm-why-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.hm-tile {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color .25s ease, background-color .25s ease;
}
.hm-tile:hover { border-color: rgba(219, 158, 29, .45); background: rgba(255, 255, 255, .08); }
.hm-tile-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(219, 158, 29, .16); color: var(--hm-gold);
}
.hm-tile h3 { color: #fff; font-size: 1.05rem; margin-bottom: 7px; }
.hm-tile p { color: rgba(255, 255, 255, .68); font-size: .92rem; margin: 0; }

.hm-quote {
  margin-top: 34px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-left: 4px solid var(--hm-gold);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  padding: 26px 30px;
}
.hm-quote p {
  color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.4; margin: 0 0 8px;
}
.hm-quote cite { color: var(--hm-gold); font-style: normal; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   4. Sending plans / supported formats
   -------------------------------------------------------------------------- */
.hm-formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 14px;
  height: 100%;
}
.hm-format {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px 20px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.hm-format:hover { border-color: var(--swei-blue); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.hm-format > svg {
  color: var(--swei-blue); flex: 0 0 auto;
  width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--swei-blue-50);
}
.hm-format b { display: block; font-family: var(--font-display); font-size: .98rem; color: var(--ink); font-weight: 700; margin-bottom: 3px; }
.hm-format span span { display: block; font-size: .84rem; color: var(--slate-2); line-height: 1.45; }

.hm-note-card {
  background: var(--swei-blue-50);
  border: 1px solid rgba(37, 105, 188, .2);
  border-radius: var(--radius);
  padding: 26px 28px;
  height: 100%;
}
.hm-note-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.hm-note-card p { font-size: .95rem; margin-bottom: 0; }
.hm-note-card ul { list-style: none; padding: 0; margin: 16px 0 0; }
.hm-note-card li {
  display: flex; gap: 10px; padding: 7px 0;
  color: var(--ink-2); font-size: .93rem; line-height: 1.45;
}
.hm-note-card li svg { color: var(--swei-olive); flex: 0 0 auto; margin-top: 4px; }

/* --------------------------------------------------------------------------
   5. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .hm-hero-media { width: 62%; clip-path: polygon(30% 0, 100% 0, 100% 100%, 10% 100%); }
  .hm-creds-card { grid-template-columns: repeat(2, 1fr); }
  .hm-cred:nth-child(3) { border-left: 0; }
  .hm-cred:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
}

@media (max-width: 991.98px) {
  :root { --hm-hero-h: clamp(420px, 62vh, 540px); }
  .hm-hero-media {
    width: 100%; clip-path: none;
  }
  .hm-hero-media::after {
    background: linear-gradient(170deg, rgba(8, 27, 51, .80), rgba(8, 27, 51, .90));
  }
  .hm-hero-copy { max-width: 100%; }
  .hm-hero-inner { padding-block: clamp(48px, 8vw, 72px) clamp(118px, 16vw, 150px); }
  .hm-why-grid { grid-template-columns: 1fr; }
  .hm-formats { grid-template-columns: repeat(3, 1fr); height: auto; }
}

@media (max-width: 767.98px) {
  .hm-hero h1 { font-size: clamp(1.85rem, 7.6vw, 2.5rem); }
  .hm-hero-lead { font-size: .98rem; }
  .hm-hero-actions .btn { width: 100%; justify-content: center; }
  .hm-hero-facts { gap: 14px 20px; }
  .hm-arrows { display: none; }
  .hm-dots button { width: 40px; }
  .hm-creds { margin-top: -34px; }
  .hm-creds-card { grid-template-columns: 1fr; }
  .hm-cred { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 24px; }
  .hm-cred:first-child { border-top: 0; }
  .hm-why-tiles { grid-template-columns: 1fr; }
  .hm-formats { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .hm-callout { flex-direction: column; align-items: flex-start; }
  .hm-callout .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-dots button.active::after { animation: none; transform: scaleX(1); }
  .hm-hero .carousel-fade .carousel-item { transition: none; }
  .hm-format:hover { transform: none; }
}