/* HMF Case Study — elegant narrative project layout */

.hmf-cs-hero {
  position: relative;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: flex-end;
  padding: 9rem 0 5rem;
  color: #fff;
  overflow: hidden;
  background: #0c1f3a;
}

.hmf-cs-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hmf-cs-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 20, 40, 0.2) 0%, rgba(8, 20, 40, 0.55) 42%, rgba(8, 20, 40, 0.92) 100%),
    linear-gradient(90deg, rgba(8, 20, 40, 0.62) 0%, rgba(8, 20, 40, 0.12) 70%);
}

.hmf-cs-hero .container {
  position: relative;
  z-index: 2;
}

.hmf-cs-kicker {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.hmf-cs-hero h1 {
  margin: 0 0 0.9rem;
  max-width: 14ch;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hmf-cs-tagline {
  margin: 0 0 1.35rem;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.4;
  font-weight: 400;
}

.hmf-cs-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hmf-cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hmf-cs-tags li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hmf-cs-tags i {
  color: #ED1C24;
  font-size: 0.9rem;
}

.hmf-cs-section {
  padding: 5.5rem 0;
}

.hmf-cs-section--tint {
  background: #f6f7f9;
}

.hmf-cs-section--soft {
  background: #fff;
}

.hmf-cs-section--dark {
  background: #0f2647;
  color: #fff;
}

.hmf-cs-eyebrow {
  display: inline-block;
  margin: 0 0 0.85rem;
  color: #ED1C24;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hmf-cs-section h2 {
  margin: 0 0 1.15rem;
  color: #142a4f;
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.hmf-cs-section p {
  color: #4a5568;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Dark section text must win over base .hmf-cs-section h2/p */
.hmf-cs-section.hmf-cs-section--dark,
.hmf-cs-section.hmf-cs-section--dark h1,
.hmf-cs-section.hmf-cs-section--dark h2,
.hmf-cs-section.hmf-cs-section--dark h3,
.hmf-cs-section.hmf-cs-section--dark h4,
.hmf-cs-section.hmf-cs-section--dark p,
.hmf-cs-section.hmf-cs-section--dark li {
  color: #ffffff !important;
}

.hmf-cs-section.hmf-cs-section--dark .hmf-cs-eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.hmf-cs-section.hmf-cs-section--dark .hmf-cs-challenges p {
  color: rgba(255, 255, 255, 0.78);
}

.hmf-cs-section.hmf-cs-section--dark .hmf-cs-challenges li::before {
  color: rgba(255, 255, 255, 0.4);
}

.hmf-cs-prose {
  max-width: 40rem;
}

.hmf-cs-prose p + p {
  margin-top: 1.1rem;
}

.hmf-cs-media {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  min-height: 380px;
}

.hmf-cs-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.hmf-cs-meta {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2.75rem;
  border-top: 0;
}

@media (min-width: 768px) {
  .hmf-cs-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .hmf-cs-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hmf-cs-meta__item {
  position: relative;
  padding: 1.2rem 1.25rem 1.25rem;
  border: 0;
  border-bottom: 0;
  background: #f4f6f9;
  border-radius: 2px;
}

.hmf-cs-meta__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ED1C24;
}

.hmf-cs-meta__item h4 {
  margin: 0 0 0.55rem;
  color: #163563;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hmf-cs-meta__item p {
  margin: 0;
  color: #243552;
  font-size: 0.98rem;
  line-height: 1.5;
  font-weight: 500;
}

.hmf-cs-meta--wide {
  margin-top: 0.85rem;
  border-top: 0;
  grid-template-columns: 1fr;
}

.hmf-cs-meta--wide .hmf-cs-meta__item {
  border-right: 0;
  padding: 1.25rem 1.35rem 1.35rem;
}

.hmf-cs-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

@media (min-width: 992px) {
  .hmf-cs-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
  }
}

.hmf-cs-fact {
  padding: 0;
  border-top: 1px solid rgba(20, 42, 79, 0.14);
  background: transparent;
  box-shadow: none;
  padding-top: 1.25rem;
}

.hmf-cs-fact__icon {
  display: none;
}

.hmf-cs-fact h3 {
  margin: 0 0 0.45rem;
  color: #142a4f;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hmf-cs-fact p {
  margin: 0;
  color: #6b7588;
  font-size: 0.92rem;
  line-height: 1.5;
}

.hmf-cs-works {
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
  color: #4a5568;
}

.hmf-cs-works li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
}

.hmf-cs-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #4a5568;
}

.hmf-cs-list li {
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

.hmf-cs-services {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(20, 42, 79, 0.12);
}

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

@media (min-width: 992px) {
  .hmf-cs-services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hmf-cs-services li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.35rem 0;
  border: 0;
  border-bottom: 1px solid rgba(20, 42, 79, 0.1);
  background: transparent;
}

.hmf-cs-services__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(20, 42, 79, 0.2);
  color: #163563;
  font-size: 0.95rem;
}

.hmf-cs-services span:last-child {
  color: #142a4f;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.hmf-cs-values {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  margin: 1.5rem 0 0;
}

.hmf-cs-values__item {
  padding: 0 0 0 1rem;
  border-left: 2px solid #ED1C24;
  border-top: 0;
}

.hmf-cs-values__item p {
  margin: 0;
  color: #4a5568;
  font-size: 0.98rem;
  line-height: 1.6;
}

.hmf-cs-challenges {
  counter-reset: hmf-cs-challenge;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .hmf-cs-challenges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hmf-cs-challenges li {
  position: relative;
  padding: 0;
  border-left: 0;
  background: transparent;
  padding-top: 0.25rem;
}

.hmf-cs-challenges li::before {
  counter-increment: hmf-cs-challenge;
  content: counter(hmf-cs-challenge, decimal-leading-zero);
  display: block;
  margin-bottom: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.hmf-cs-challenges h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 600;
}

.hmf-cs-challenges p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
  line-height: 1.6;
}

.hmf-cs-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hmf-cs-split {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 4rem;
  }

  .hmf-cs-split--reverse {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hmf-cs-split--reverse .hmf-cs-split__copy {
    order: 2;
  }

  .hmf-cs-split--reverse .hmf-cs-split__media {
    order: 1;
  }
}

.hmf-cs-gallery {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.65rem;
  min-height: 420px;
}

.hmf-cs-gallery__main {
  grid-row: 1 / span 2;
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}

.hmf-cs-gallery__main img,
.hmf-cs-gallery__side img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hmf-cs-gallery__side {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  min-height: 0;
}

.hmf-cs-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .hmf-cs-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .hmf-cs-photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.hmf-cs-photo-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 1 / 1;
}

.hmf-cs-photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hmf-cs-photo-grid figure:hover img {
  transform: scale(1.03);
}

.hmf-cs-photo-feature {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .hmf-cs-photo-feature {
    grid-template-columns: 2fr 1fr;
  }
}

.hmf-cs-photo-feature figure {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 10;
}

.hmf-cs-photo-feature figure:last-child {
  aspect-ratio: auto;
  min-height: 100%;
}

.hmf-cs-photo-feature img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hmf-cs-banner {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 2.75rem;
  color: #fff;
}

.hmf-cs-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hmf-cs-banner__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 20, 40, 0.15) 0%, rgba(8, 20, 40, 0.82) 100%);
}

.hmf-cs-banner__copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hmf-cs-banner h2 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.01em;
}

.hmf-cs-banner h2 span {
  color: #ff6b6b;
}

.hmf-cs-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.65;
}

.hmf-cs-related-title {
  margin-bottom: 2rem;
}

.hmf-cs-related-card {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  border: 0;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transition: opacity 0.25s ease;
}

.hmf-cs-related-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
  color: inherit;
  opacity: 0.92;
}

.hmf-cs-related-card__img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.hmf-cs-related-card__body {
  padding: 1.15rem 0 0;
}

.hmf-cs-related-card__sector {
  display: inline-block;
  margin: 0 0 0.4rem;
  color: #ED1C24;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hmf-cs-related-card h3 {
  margin: 0 0 0.45rem;
  color: #142a4f;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hmf-cs-related-card p {
  margin: 0;
  color: #6b7588;
  font-size: 0.92rem;
  line-height: 1.55;
}

.hmf-cs-cta {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background: #0f2647;
  color: #fff;
  text-align: center;
}

.hmf-cs-cta h2 {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  letter-spacing: -0.02em;
}

.hmf-cs-cta p {
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.75);
}

.hmf-cs-cta .btn-main {
  margin: 0 0.35rem 0.5rem;
}

.hmf-cs-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  color: #163563;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 53, 99, 0.35);
  padding-bottom: 2px;
}

.hmf-cs-pdf-link:hover {
  color: #ED1C24;
  border-bottom-color: #ED1C24;
}

.hmf-cs-dashboard {
  display: none;
}

@media (max-width: 767.98px) {
  .hmf-cs-hero {
    min-height: auto;
    padding: 7.5rem 0 3.25rem;
  }

  .hmf-cs-hero h1 {
    max-width: none;
  }

  .hmf-cs-section {
    padding: 3.75rem 0;
  }

  .hmf-cs-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
  }

  .hmf-cs-gallery__main {
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .hmf-cs-gallery__side {
    aspect-ratio: 16 / 10;
  }

  .hmf-cs-related-card__img {
    height: 180px;
  }

  .hmf-cs-banner {
    min-height: 240px;
    padding: 1.75rem;
  }

  .hmf-cs-photo-feature {
    grid-template-columns: 1fr;
  }

  .hmf-cs-photo-feature figure,
  .hmf-cs-photo-feature figure:last-child {
    aspect-ratio: 16 / 10;
  }
}
