/* ===== CSS RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

:root {
  --container-max: 1536px;
  --container-gutter: 24px;
  --fs-xs: 10px;
  --fs-s: 12px;
  --fs-reg: 16px;
  --fs-l: 18px;
  --fs-xl: 20px;
  --fs-xxl: 24px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  font-family: 'HPE Graphik XX Condensed', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1;
}
h1 {
  font-size: 100px;
}
p {
  font-family: 'HPE Graphik', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.2;
  font-size: var(--fs-xl);
}

/* ===== Base Styles ===== */
body {
  background: #292d3a;
  color: #fff;
  display: grid;
}
header {
  position: fixed;
  top: 0;
  background: transparent;
  z-index: 3;
  width: 100%;
  display: grid;
}
header.is-solid {
  background: #292d3a;
  box-shadow: 0px 1px 4px #00000030;
  /* border-bottom: 1px solid #fff; */
}
.header-content {
  padding-block: 24px;
  justify-self: center;
  width: min(calc(100% - 48px), 1521px);
}

/* ===== Hero Section ===== */
.video-section {
  position: relative;
  height: 300vh; /* scroll distance pr sektion */
}
.video-section__second {
  height: 400vh;
}

.video-pin {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.scroll-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding-top: 24vh;
  pointer-events: none;
}
.overlay-content {
  display: grid;
  gap: 16px;
}

.video-overlay h1 span {
  font-weight: 300;
}

.video-overlay p {
  font-size: var(--fs-l);
  max-width: 600px;
}

.hpe-cooling {
  display: grid;
  gap: 48px;
  background: #292d3a;
  z-index: 2;
  padding: 154px 0 44px;
}
.text-grid {
  display: grid;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.text-grid p {
  font-size: var(--fs-l);

  & span {
    font-weight: 600;
  }
}
/* bleed */

.content-wrapper {
  width: min(calc(100% - (var(--container-gutter) * 2)), calc(var(--container-max) - var(--container-gutter) / 2));
  margin-inline: auto;
}

.bleed-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.bleed-right.first {
  grid-template-columns: 3fr 4fr;
  overflow: hidden;
}
.img-vert {
  display: none;
}

.bleed-right__left {
  padding-left: max(var(--container-gutter), calc((100vw - var(--container-max)) / 2));
  max-width: calc(100vw / 2);
}
.bleed-left {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.bleed-left__right {
  padding-right: var(--container-gutter);
  /* padding-right: max(var(--container-gutter), calc((100vw - var(--container-max)) / 2)); */
  max-width: calc(var(--container-max) / 2);
}

/* graph */
.chart-section {
  padding-block: 88px 172px;
  z-index: 2;
  background: #292d3a;
}
.special-wrapper-right {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
  padding-block: 64px;
  margin-left: max(var(--container-gutter), calc((100vw - var(--container-max)) / 2));
  background: #fff;
  border-top-left-radius: 40px;
  border-bottom-left-radius: 40px;
  margin-bottom: 200px;
}

.bleed-left__right {
  align-self: center;
  color: #000;
}

.bleed-left__right h3 {
  font-size: 28px;
  font-family: 'HPE Graphik';
  margin-bottom: 8px;
}

.bleed-left__right p {
  font-size: var(--fs-xl);
  text-wrap: balance;
  line-height: 32px;
}

.chart-grid {
  padding: 24px 16px 16px;
  display: grid;
  grid-template-columns: auto auto 600px auto auto;
  grid-template-rows: auto 200px auto;
  gap: 4px;
  background-color: rgb(240, 238, 238);
  color: #000;
  align-self: start;
  max-width: fit-content;
}
.chart-mobile {
  display: none;
}
.bleed-right.second {
  gap: 16px;
}
.bleed-right__left.fluid-cooling {
  padding-left: 64px;

  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  color: #000;
}
.fluid-cooling {
  max-width: calc(100% - 32px);
}
.fluid-cooling h3 {
  font-size: 28px;
  font-family: 'HPE Graphik';
  margin-bottom: 8px;
}
.fluid-cooling p {
  font-size: var(--fs-xl);
  text-wrap: balance;
  line-height: 1.5;
}
p.small-note {
  font-size: 14px;
}
.chart-grid h3 {
  grid-column: 1/-1;
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}
.chart-grid p {
  font-size: var(--fs-l);
}
.graf-1 img {
  width: 600px;
  height: 200px;
}

.flipped {
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  text-align: center;
  grid-row: 2/4;
  grid-column: 1/2;
  margin-right: 8px;

  &:nth-child(2 of .flipped) {
    grid-column: -2/-1;
    margin-right: 0px;
    margin-left: 8px;
  }
  & p {
    font-weight: 600;
  }
}
.line-values {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-grid :nth-child(1 of .line-values) {
  align-items: end;
}

.projection-years {
  grid-column: 3/4;
  display: flex;
  justify-content: space-around;

  & p {
    font-weight: 600;
    font-size: var(--fs-l);
  }
}
.cooling-methods {
  grid-column: 2/5;
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 16px;

  > div {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  & p {
    font-size: var(--fs-l);
  }
}
.indicator {
  width: 40px;
  height: 10px;
  display: grid;
}
.cooling-methods :first-child .indicator {
  background: #0d5265;
}
.cooling-methods :nth-child(2) .indicator {
  background: #ff8300;
}
.cooling-methods :nth-child(3) .indicator {
  background: #01a982;
  height: 4px;
  position: relative;

  &::after {
    content: '';
    position: absolute;
    height: 12px;
    border-radius: 40px;
    aspect-ratio: 1;
    top: calc(50% - 6px);
    left: calc(50% - 6px);
    background: #01a982;
  }
}

/* Graph 1 svg styles */
.trend-chart__grid-line {
  stroke: #a8a8a8;
  stroke-width: 1;
}

.trend-bar__bottom {
  fill: #0d5265;
}

.trend-bar__top {
  fill: #ff8300;
}

.trend-bar__label {
  fill: #000;
  font-family: 'HPE Graphik', sans-serif;
  font-size: 12px;
  font-weight: 700;
}

/* ===== Trend chart animation initial state ===== */
.graf-1 .trend-bar__label {
  fill: #000;
  font-family: 'HPE Graphik', sans-serif;
  font-size: 12px;
  font-weight: 700;

  opacity: 0;
  transform: translateY(6px);
}

/* ===== Trend line ===== */
.trend-line__path {
  fill: none;
  stroke: #01a982;
  stroke-width: 3;
}

.trend-line__point {
  fill: #01a982;
  stroke-width: 1;
  stroke: #fff;
  transform-origin: center;
  transform-box: fill-box;
}

.graf-1 .trend-line__path,
.graf-1 .trend-line__point {
  opacity: 1;
}

/* --- graph 2 --- */
.special-wrapper-left {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
  padding-block: 64px;
  margin-right: max(var(--container-gutter), calc((100vw - var(--container-max)) / 2));
  background: #fff;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
}

.chart-wrapper {
  width: 656px;
  position: relative;
  background: #fff;
  justify-self: center;
}
.chart-wrapper h3 {
  font-family: 'HPE Graphik';
  font-size: 28px;
  color: #000;
  text-align: center;
}
.chart-svg .bar {
  transform-origin: bottom;
  transform-box: fill-box;
}
.chart-wrapper_mobile {
  display: none;
}
.chart-wrapper_mobile h3 {
  font-size: 24px;
  font-weight: 600;
  font-family: 'HPE Graphik';
  text-align: center;
}

.arrow,
.info {
  opacity: 0;
}

.counters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #000;
  font-family: 'HPE Graphik', sans-serif;
  font-weight: 600;
}

.counter {
  position: absolute;
  opacity: 0;
  transition: opacity 0.3s;
}
.counter-1 {
  bottom: 225px;
  left: 58px;
}
.counter-2 {
  bottom: 182px;
  left: 216px;
}
.counter-3 {
  bottom: 76px;
  left: 382px;
}
.counter-4 {
  bottom: 68px;
  left: 532px;
}
.chart-svg .bar {
  transform-origin: bottom;
  z-index: 1;
}

.bar-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bar-label {
  position: absolute;
  width: 120px; /* samme som bar */
  background: #f5f5f5;
  color: #000;
  text-align: center;
  padding: 8px 0px;
  font-family: 'HPE Graphik', sans-serif;
  font-size: 11px;
  font-weight: 600;
}

/* Positionering matcher bar x-position */
.label-1 {
  left: 31px;
}
.label-2 {
  left: 189px;
}
.label-3 {
  left: 347px;
}
.label-4 {
  left: 502px;
}
.bar-label {
  top: 480px;
}

/* form section */
.form-section {
  height: 100vh;
  background: #292d3a;
}
.grid_1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.termometer-container {
  display: grid;
  place-content: center;
}
.form-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-container h1 {
  text-transform: uppercase;
}
.form-container p {
  max-width: 638px;
  font-size: var(--fs-xl);
  line-height: 1.5;
  text-wrap: pretty;
}

.form-wrapper {
  padding-block: 16px;
}

/* eMarketeer restyle */
.sd-body {
  padding: 0 !important;
}
.altcha-label {
  color: #fff;
}
.sd-action-bar {
  padding-block: 32px 0 !important;
}
.sv-action,
.sv-action__content,
.sd-navigation__complete-btn {
  width: 100%;
}
.iti__selected-dial-code {
  color: #000;
}

@media (min-width: 1637px) {
  .chart-wrapper {
    justify-self: end;
  }
}
@media (max-width: 1536px) {
  .content-wrapper,
  header {
    padding-inline: 24px;
  }
  .text-grid p {
    padding-left: 24px;
  }
}
@media (768px < width < 1280px) {
  .bleed-right.first {
    grid-template-columns: 1fr max(300px, 35%);
  }
  .img-vert {
    display: block;
  }
  .img-hori {
    display: none;
  }
}
@media (max-width: 1280px) {
  .chart-section {
    padding-bottom: 96px;
  }
  .second {
    grid-template-columns: 1fr;
    align-items: center;
  }
  .special-wrapper-right {
    margin-inline: 24px;
    margin-bottom: 96px;
    border-radius: 40px;
    padding: 48px 16px;
    gap: 48px;
    justify-items: center;
  }
  .bleed-right__left.fluid-cooling {
    padding-left: 0;
    gap: 16px;
  }
}
@media (max-width: 1098px) {
  .special-wrapper-left {
    grid-template-columns: 1fr;
    margin-inline: 24px;
    border-radius: 40px;
    padding: 48px 24px;
    gap: 48px;
    justify-items: center;
  }
  .bleed-left__right {
    padding-right: 0;
  }
  .grid_1-1 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1024px) {
  .bleed-right {
    gap: 24px;
  }
  .special-wrapper-right,
  .special-wrapper-left {
    margin-inline: 0;
    border-radius: 0;
    padding-inline: 0;
  }
  .bleed-left__right {
    padding-inline: 16px;

    & p {
      text-wrap: unset;
    }
  }
}
@media (max-width: 844px) {
  .chart-grid {
    display: none;
  }
  .chart-mobile {
    display: grid;
    padding-inline: 16px;
  }
}
@media (max-width: 672px) {
  .chart-wrapper {
    display: none;
  }
  .chart-wrapper_mobile {
    display: grid;
    gap: 16px;
  }
}
@media (max-width: 768px) {
  :root {
    --container-gutter: 16px;
  }
  .content-wrapper,
  header {
    padding-inline: 0;
  }
  .bleed-right.first {
    grid-template-columns: 1fr;
  }
  .bleed-right__left {
    max-width: unset;
  }
  .text-grid p {
    padding-inline: 0 16px;
  }
  .img-container {
    padding-inline: var(--container-gutter);
  }
  .bleed-right {
    gap: 16px;
  }
  .hpe-cooling {
    gap: 24px;
  }
  .hpe-cooling h1 {
    text-wrap: balance;
  }
  h1 {
    font-size: 64px;
  }
}
@media (max-width: 440px) {
  :root {
    --fs-xs: 8px;
    --fs-s: 10px;
    --fs-reg: 14px;
    --fs-l: 16px;
    --fs-xl: 18px;
    --fs-xxl: 20px;
  }
  .chart-wrapper_mobile h3 {
    font-size: 20px;
  }
}
