/* HAEVA image-based case study: the shared case-study framework, adapted for power systems. */
.haeva-case-study {
  --accent: #25d8ff;
  --accent-rgb: 37 216 255;
  --haeva-cyan: #25d8ff;
}

.haeva-case-study .hero-visual img {
  object-position: 50% 52%;
  filter: saturate(0.78) contrast(1.08) brightness(0.86);
}

.haeva-case-study .hero-visual::after {
  background:
    linear-gradient(90deg, var(--navy) 0%, rgb(4 27 44 / 72%) 11%, transparent 43%),
    linear-gradient(0deg, rgb(2 19 31 / 67%), transparent 51%);
}

.haeva-case-study .hero-grid {
  background-image:
    linear-gradient(rgb(37 216 255 / 16%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(37 216 255 / 16%) 1px, transparent 1px);
}

.haeva-case-study .hero-fact {
  border-left-color: var(--haeva-cyan);
}

.haeva-case-study .haeva-image-map {
  aspect-ratio: auto;
  min-height: 620px;
  isolation: isolate;
  background: #071b27;
}

.haeva-case-study .haeva-rig-image,
.haeva-case-study .haeva-image-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.haeva-case-study .haeva-rig-image {
  z-index: 1;
  display: block;
  object-fit: cover;
  object-position: 48% 54%;
  filter: saturate(0.78) contrast(1.07) brightness(0.73);
  transition: filter 320ms ease;
}

.haeva-case-study .haeva-image-map:hover .haeva-rig-image {
  filter: saturate(0.9) contrast(1.04) brightness(0.82);
}

.haeva-case-study .haeva-image-wash {
  z-index: 2;
  background:
    linear-gradient(180deg, rgb(1 15 24 / 12%), transparent 48%, rgb(1 15 24 / 58%)),
    linear-gradient(90deg, rgb(2 19 31 / 28%), transparent 32% 72%, rgb(2 19 31 / 28%));
  pointer-events: none;
}

.haeva-case-study .hotspots-layer { z-index: 3; }
.haeva-case-study .hotspot[data-zone="paralleling"] { top: 53%; left: 49%; }
.haeva-case-study .hotspot[data-zone="protection"] { top: 31%; left: 57%; }
.haeva-case-study .hotspot[data-zone="visibility"] { top: 70%; left: 58%; }
.haeva-case-study .hotspot[data-zone="pms"] { top: 75%; left: 34%; }
.haeva-case-study .hotspot-reverse { flex-direction: row-reverse; }

.haeva-case-study .hotspot.is-active span {
  border-color: var(--haeva-cyan);
  background: rgb(37 216 255 / 13%);
  color: var(--haeva-cyan);
  box-shadow: 0 0 0 2px rgb(37 216 255 / 90%), 0 0 0 7px rgb(37 216 255 / 14%);
}

.haeva-case-study .hotspot.is-active em { border-color: rgb(37 216 255 / 75%); }
.haeva-case-study .view-label span { background: var(--haeva-cyan); }
.haeva-case-study .view-label {
  z-index: 4;
  padding: 8px 10px;
  background: rgb(2 19 31 / 68%);
  backdrop-filter: blur(5px);
}

.haeva-case-study .system-panel { min-width: 0; }
.haeva-case-study .system-panel > * { transition: opacity 130ms ease, transform 180ms ease; }
.haeva-case-study .system-panel.is-updating > * { opacity: 0.34; transform: translateY(4px); }
.haeva-case-study .panel-topline span,
.haeva-case-study .system-stat strong,
.haeva-case-study .system-panel li::before { color: var(--haeva-cyan); }

.haeva-case-study .system-stat strong {
  white-space: nowrap;
  font-size: clamp(2.45rem, 4.4vw, 4.8rem);
}

.haeva-case-study .service-bridge {
  padding: clamp(88px, 9vw, 138px) 8vw;
  background: #e9e6de;
  color: #193c4d;
}

.haeva-case-study .service-bridge-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(270px, 0.65fr);
  align-items: end;
  gap: clamp(36px, 7vw, 110px);
  max-width: 1500px;
  margin: 0 auto clamp(44px, 6vw, 72px);
}

.haeva-case-study .service-bridge .section-label {
  margin-bottom: 38px;
  color: #2e5c73;
}

.haeva-case-study .service-bridge h2 {
  margin: 0;
  font-size: clamp(44px, 5.2vw, 78px);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.haeva-case-study .service-bridge-heading > p {
  max-width: 420px;
  margin: 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--haeva-cyan);
  color: #3e5867;
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
  line-height: 1.75;
}

.haeva-case-study .service-bridge-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  max-width: 1500px;
  margin: 0 auto;
  border: 1px solid #bdc4c5;
  background: #f3f0e8;
}

.haeva-case-study .service-image {
  position: relative;
  min-height: 520px;
  margin: 0;
  overflow: hidden;
  background: #081c29;
}

.haeva-case-study .service-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.04) brightness(0.84);
}

.haeva-case-study .service-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(2 19 31 / 76%), transparent 45%);
  content: "";
  pointer-events: none;
}

.haeva-case-study .service-image figcaption {
  position: absolute;
  z-index: 1;
  right: 26px;
  bottom: 22px;
  left: 26px;
  color: #f5f9fb;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.haeva-case-study .service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-left: 1px solid #bdc4c5;
}

.haeva-case-study .service-grid article {
  min-height: 260px;
  padding: clamp(24px, 3vw, 42px);
  border-right: 1px solid #bdc4c5;
  border-bottom: 1px solid #bdc4c5;
}

.haeva-case-study .service-grid article:nth-child(2n) { border-right: 0; }
.haeva-case-study .service-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
.haeva-case-study .service-grid span {
  color: #37728e;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.haeva-case-study .service-grid h3 {
  margin: 38px 0 16px;
  font-size: clamp(1.4rem, 2.1vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.haeva-case-study .service-grid p {
  margin: 0;
  color: #526a77;
  font-size: 0.94rem;
  line-height: 1.62;
}

.haeva-case-study .pms-link {
  display: inline-block;
  margin-top: 30px;
  padding-bottom: 7px;
  border-bottom: 1px solid #193c4d;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.haeva-case-study .pms-link span { margin-left: 7px; color: #137c9c; }
.haeva-case-study .metrics-grid strong { white-space: nowrap; }

.haeva-case-study .noscript-systems {
  width: min(100%, 1500px);
  margin: 28px auto 0;
  padding: 26px 30px;
  border: 1px solid #294351;
  border-left: 3px solid var(--haeva-cyan);
  background: #061b27;
  color: #b8cad3;
  line-height: 1.7;
}

.haeva-case-study .noscript-systems .section-label { margin-bottom: 12px; color: var(--haeva-cyan); }
.haeva-case-study .noscript-systems p:last-child { margin: 0; }

@media (max-width: 1200px) {
  .haeva-case-study .explorer-stage { grid-template-columns: 1fr; }
  .haeva-case-study .haeva-image-map { aspect-ratio: 3 / 2; min-height: 0; }
  .haeva-case-study .haeva-rig-image { object-position: center; }
  .haeva-case-study .system-panel { min-height: 520px; border-top: 1px solid #294351; border-left: 0; }
  .haeva-case-study .service-bridge-content { grid-template-columns: 1fr; }
  .haeva-case-study .service-image { min-height: 430px; }
  .haeva-case-study .service-grid { border-top: 1px solid #bdc4c5; border-left: 0; }
}

@media (max-width: 900px) {
  .haeva-case-study .service-bridge,
  .haeva-case-study .service-bridge-heading { display: block; }
  .haeva-case-study .service-bridge { padding: 90px 7vw; }
  .haeva-case-study .service-bridge-heading > p { margin-top: 38px; }
}

@media (max-width: 700px) {
  .haeva-case-study .hotspot[data-zone="paralleling"] { left: 46%; }
  .haeva-case-study .hotspot[data-zone="pms"] { left: 30%; }
  .haeva-case-study .service-bridge { padding: 72px 0 0; }
  .haeva-case-study .service-bridge-heading { padding: 0 24px; }
  .haeva-case-study .service-bridge-content { border-right: 0; border-left: 0; }
  .haeva-case-study .service-image { min-height: 300px; }
  .haeva-case-study .service-grid { grid-template-columns: 1fr; }
  .haeva-case-study .service-grid article,
  .haeva-case-study .service-grid article:nth-child(2n) { min-height: 0; border-right: 0; border-bottom: 1px solid #bdc4c5; }
  .haeva-case-study .service-grid article:last-child { border-bottom: 0; }
  .haeva-case-study .pms-link { margin: 30px 24px 72px; }
}

@media (max-width: 560px) {
  .haeva-case-study .hero h1 { font-size: 58px; }
  .haeva-case-study .hotspot em { display: none; }
  .haeva-case-study .hotspot span { flex-basis: 40px; width: 40px; height: 40px; font-size: 0.68rem; }
  .haeva-case-study .metrics-grid strong { font-size: clamp(31px, 10vw, 42px); }
}

@media (prefers-reduced-motion: reduce) {
  .haeva-case-study .haeva-rig-image,
  .haeva-case-study .system-panel > * { transition: none; }
  .haeva-case-study .system-panel.is-updating > * { opacity: 1; transform: none; }
}
