/*
 * The landing page, part 1 (card 21): hero, client logos, What we do, Easy to deploy, Proof
 * numbers. Figma V12, desktop 3596:5284 (1512) and mobile 3596:29737 (390). Widths: mobile under
 * 768 px, tablet 768 to 1279 px (PM layout), desktop from 1280 px. Every value comes from
 * tokens.css. Motion stops with prefers-reduced-motion (end of file). The patterns shared with
 * the Solution page (eyebrow, buttons, headings, navy sections, Easy to deploy) are in
 * sections.css (card 23), loaded before this file.
 */

.page--landing {
  padding-top: 0;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 104px 0 48px;
  background: var(--color-white);
}

.hero__photo {
  position: absolute;
  z-index: -1;
  inset: 0;
}

.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 92.6% 0;
}

.hero__photo::before,
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero__photo::before {
  background: var(--gradient-hero-mobile), var(--gradient-hero-soft);
}

.hero__photo::after {
  inset: auto 0 0;
  height: 120px;
  background: var(--gradient-hero-fade);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.hero__eyebrow {
  color: var(--color-navy-900);
}

.hero__title {
  color: var(--color-navy-900);
  font-size: var(--text-hero-size);
  line-height: var(--text-hero-line);
  font-weight: var(--weight-bold);
}

/* Nothing moves while the phrase types: the lines are fixed, and the phrase keeps the width of
   the longest one. */
.hero__title-visual {
  display: block;
  white-space: nowrap;
}

.br-wide {
  display: none;
}

.typed {
  display: inline-grid;
  color: var(--color-teal-400);
  vertical-align: top;
}

.typed > * {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.typed__sizer {
  visibility: hidden;
  padding-right: max(2px, 0.0625em);
}

.typed__text::after {
  content: "";
  display: inline-block;
  width: max(2px, 0.0625em);
  height: 0.875em;
  margin-left: 0.02em;
  border-radius: 2px;
  background: var(--color-teal-400);
  vertical-align: -0.1em;
  animation: cursor-blink 1s step-end infinite;
}

.typed.is-typing .typed__text::after {
  animation: none;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.hero__subtitle {
  color: var(--color-hero-subtitle);
  font-size: var(--text-lead-size);
  line-height: var(--text-lead-line);
}

.hero__button {
  width: 100%;
  margin-top: var(--space-8);
}

/* The visual: the dial and its three cards (350 x 317 on mobile, drawn at 324 then scaled). */
.hero__visual {
  position: relative;
  height: 317px;
  margin-top: var(--space-40);
}

.dial {
  position: absolute;
  top: -2px;
  left: calc(50% - 162px);
  width: 324px;
  height: 324px;
  transform: scale(0.7407);
}

.dial__face,
.dial__ticks,
.dial__sweep {
  position: absolute;
  max-width: none;
}

.dial__face {
  top: -26px;
  left: -44px;
  width: 412px;
  height: 412px;
}

.dial__ticks,
.dial__sweep {
  top: -38px;
  left: -38px;
  width: 400px;
  height: 400px;
}

.dial__sweep path {
  fill: none;
  stroke: var(--color-dial-sweep);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: 0;
  animation: dial-sweep 3333ms linear infinite;
  animation-delay: calc(var(--i) * 55.555ms);
}

.dial__glow {
  flood-color: var(--color-teal-200);
}

/* Each graduation: up in 120 ms, then down in 600 ms; the next starts 55.6 ms later (Figma). */
@keyframes dial-sweep {
  0% {
    opacity: 0;
  }

  3.6% {
    opacity: 1;
    animation-timing-function: ease-out;
  }

  21.6%,
  100% {
    opacity: 0;
  }
}

.dial__readout {
  position: absolute;
  top: 94.5px;
  left: 79px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-white);
}

.dial__value {
  display: flex;
  align-items: flex-start;
  color: var(--color-teal-400);
  font-size: var(--text-dial-value-size);
  line-height: var(--text-dial-value-size);
  font-weight: var(--weight-thin);
  letter-spacing: -3px;
  text-shadow: var(--shadow-dial-value);
}

.dial__gap {
  display: inline-block;
  width: 2px;
  overflow: hidden;
  font-size: 2px;
}

.dial__unit {
  font-size: var(--text-dial-unit-size);
  line-height: 52px;
  letter-spacing: 0;
}

.dial__caption {
  font-size: var(--text-dial-caption-size);
  line-height: normal;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--text-dial-caption-tracking);
}

.hero__cards {
  position: absolute;
  inset: 0;
}

.chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-24) 18px var(--space-20);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--space-16);
  background: var(--color-glass);
  box-shadow: var(--shadow-chip);
  backdrop-filter: blur(var(--blur-chip));
  -webkit-backdrop-filter: blur(var(--blur-chip));
  white-space: nowrap;
}

.chip__value {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  color: var(--color-navy-900);
  font-size: var(--text-chip-size);
  line-height: normal;
  font-weight: var(--weight-bold);
}

.chip__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-teal-400);
  box-shadow: var(--shadow-chip-dot);
}

.chip__label {
  color: var(--color-hero-subtitle);
  font-size: var(--text-body-size);
  line-height: normal;
}

.chip--1 {
  top: 216px;
  left: 0;
}

.chip--2 {
  top: 0;
  right: 0;
}

.chip--3 {
  top: 216px;
  right: 0;
}

/* --- 02 Client logos ----------------------------------------------------------------------- */

.clients {
  /* Card 52 (3996:4674 / 3996:4733): tiles 1.25 times larger, 185 x 107.5 on a phone (1.25 x
     0.7115 of the 208 x 120 tile, its height as drawn) and 260 x 150 from 768 px. */
  --tile-scale: 0.8894;
  --tile-height: 107.5px;
  padding: var(--space-32) 0;
  background: var(--color-grey-100);
}

.clients__viewport {
  position: relative;
  margin-top: var(--space-24);
  overflow: hidden;
}

.clients__viewport::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  background: var(--gradient-logos-right);
  pointer-events: none;
}

.clients__track {
  display: flex;
  width: max-content;
  margin-left: var(--page-margin);
  /* Card 52: the longer track (25 tiles of 260 + 8 px per copy, 6,700 px; 4,825 px on a phone)
     at the same speed as card 51's: 72 px/s at 1512 (5,400 px in 75 s), 52 px/s at 390. */
  animation: marquee 93s linear infinite;
}

.clients__viewport:hover .clients__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.clients__row {
  display: flex;
  gap: var(--space-8);
  padding-right: var(--space-8);
}

.clients__tile {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: calc(208px * var(--tile-scale));
  height: var(--tile-height);
  border-radius: calc(var(--space-16) * var(--tile-scale));
  background: var(--color-white);
  box-shadow: var(--shadow-logo-tile);
}

.clients__tile img {
  width: calc(var(--logo-width) * 1px * var(--tile-scale));
  height: calc(var(--logo-height) * 1px * var(--tile-scale));
  max-width: none;
}

/* --- 03 What we do ------------------------------------------------------------------------- */

.what-we-do {
  padding: var(--space-64) 0;
}

.what-we-do__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.contour--top {
  top: 0.63%;
  left: -331.5px;
}

.contour--mirror {
  top: 50.63%;
  left: -790.5px;
  transform: scaleX(-1);
}

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

.bento__tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  padding: var(--space-24);
  overflow: hidden;
  border-radius: var(--space-16);
  background: var(--color-navy-800);
}

.bento__label {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  color: var(--color-teal-400);
  font-size: var(--text-eyebrow-size);
  line-height: var(--text-eyebrow-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--text-eyebrow-tracking);
  text-transform: uppercase;
}

.bento__label--plain {
  color: var(--color-white);
}

.bento__caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.bento__caption .t-h3 {
  color: var(--color-white);
}

.bento__caption p:not(.bento__label) {
  color: var(--color-slate-300);
}

.bento__tile--cover {
  justify-content: flex-end;
  height: 300px;
  background: none;
}

.bento__cover {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Card 52: on a phone the 350 x 300 tile shows the portrait photo from about a tenth of its
     height (31 of 622 px in 3999:5580), the tower tops in view; wider tiles crop only the sides. */
  object-position: 50% 10%;
}

.bento__tile--cover::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--gradient-tile-photo);
}

.bento__tile--band {
  justify-content: flex-end;
  padding-top: 194px;
}

.bento__band {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 170px;
  overflow: hidden;
}

.bento__band img {
  position: absolute;
  max-width: none;
  height: auto;
}

.bento__band--dusk img {
  top: -11.44%;
  left: -5%;
  width: 166.67%;
}

.bento__band--boiler img {
  top: -16.46%;
  left: 0;
  width: 100%;
}

.bento__tile--accent {
  min-height: 260px;
  background: var(--color-teal-400);
  color: var(--color-navy-900);
}

.bento__tile--accent .bento__label,
.bento__tile--accent .bento__caption .t-h3,
.bento__tile--accent .bento__caption p:not(.bento__label) {
  color: var(--color-navy-900);
}

/* --- 05 Proof numbers ---------------------------------------------------------------------- */

.proof {
  --proof-value-size: 40px;
  --proof-value-line: 48px;
  --proof-cell-padding: var(--space-16);
  padding: var(--space-64) 0;
}

.proof__texture {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: lighten;
  opacity: 0.25;
  pointer-events: none;
}

.proof__statement {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-24);
  padding-top: var(--space-24);
}

.proof__statement .t-h2 {
  color: var(--color-white);
}

.proof__figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--space-40) 0 0;
}

.proof__cell {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--proof-cell-padding);
  /* The hairlines are drawn over the cells, as in Figma: they take no height. */
  box-shadow: inset 0 1px 0 var(--color-on-navy-rule);
}

.proof__cell:nth-child(even) {
  box-shadow:
    inset 0 1px 0 var(--color-on-navy-rule),
    inset 1px 0 0 var(--color-on-navy-rule);
}

.proof__cell dt {
  color: var(--color-slate-300);
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  white-space: nowrap;
}

.proof__value {
  margin: 0;
  color: var(--color-white);
  font-size: var(--proof-value-size);
  line-height: var(--proof-value-line);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

/* --- Tablet: 768 to 1279 px (no tablet mockup: the PM's layout) ---------------------------- */

@media (min-width: 768px) {
  .hero {
    padding: 120px 0 var(--space-80);
  }

  .hero__photo img {
    object-position: 80% 0;
  }

  .br-wide {
    display: inline;
  }

  .br-narrow {
    display: none;
  }

  .hero__button {
    align-self: flex-start;
    width: 200px;
  }

  /* Card 40: from 768 px the three cards float around the dial as on a phone and a desktop
     (ZERO top right, 5€/m² bottom left, ROI bottom right, each over the dial's edge), at the
     desktop's offsets from the dial, which stays centred: 40 px under the text, full size. */
  .hero__visual {
    height: calc(var(--space-40) + 352px);
  }

  .dial {
    top: var(--space-40);
    transform: none;
  }

  .chip--1 {
    top: calc(var(--space-40) + 251px);
    left: calc(50% - 162px - 88px);
  }

  .chip--2 {
    top: var(--space-40);
    right: auto;
    left: calc(50% - 162px + 272px);
  }

  .chip--3 {
    top: calc(var(--space-40) + 251px);
    right: auto;
    left: calc(50% - 162px + 272px);
  }

  .clients {
    --tile-scale: 1.25;
    --tile-height: 150px;
  }

  .clients__viewport {
    width: min(100% - 2 * var(--page-margin), var(--content-max));
    margin: var(--space-40) auto 0;
  }

  .clients__viewport::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: 0;
    width: 96px;
    background: var(--gradient-logos-left);
    pointer-events: none;
  }

  .clients__viewport::after {
    width: 96px;
  }

  .clients__track {
    margin-left: 0;
  }

  .clients {
    padding-bottom: var(--space-80);
  }

  .what-we-do {
    padding: var(--space-80) 0;
  }

  .contour--top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .contour--mirror {
    display: none;
  }

  /* Two columns, the same order: the photo tile spans two rows so no cell stays empty. */
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "predictive scalable"
      "real-time scalable"
      "interoperability fast-results"
      "human-support human-support";
  }

  .bento__tile--predictive {
    grid-area: predictive;
  }

  .bento__tile--scalable {
    grid-area: scalable;
    height: auto;
  }

  .bento__tile--real-time {
    grid-area: real-time;
  }

  .bento__tile--interoperability {
    grid-area: interoperability;
  }

  .bento__tile--fast-results {
    grid-area: fast-results;
  }

  .bento__tile--human-support {
    grid-area: human-support;
    min-height: 208px;
  }

  .bento__tile--text {
    justify-content: space-between;
    min-height: 208px;
  }

  .bento__tile--band {
    min-height: 320px;
  }

  .proof {
    --proof-value-size: var(--text-metric-xl-size);
    --proof-value-line: var(--text-metric-xl-line);
    --proof-cell-padding: var(--space-24);
    padding: var(--space-80) 0;
  }

  .proof__statement {
    align-items: flex-start;
  }
}

/* --- Desktop: from 1280 px, as drawn at 1512 ----------------------------------------------- */

@media (min-width: 1280px) {
  .hero {
    display: flex;
    flex-direction: column;
    height: 982px;
    padding: 80px 0 0;
  }

  .hero__photo img {
    object-position: center;
  }

  .hero__photo::before {
    background: var(--gradient-hero-desktop), var(--gradient-hero-soft);
  }

  .hero__body {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--space-40);
  }

  .hero__copy {
    flex: none;
    width: 644px;
    gap: var(--space-24);
  }

  .hero__title-visual {
    height: 140px;
  }

  .hero__subtitle {
    width: 540px;
  }

  .hero__button {
    margin-top: 0;
  }

  .hero__visual {
    display: block;
    flex: 1;
    height: 352px;
    margin: 0;
    padding: 0;
  }

  .dial {
    position: absolute;
    top: 0;
    left: calc(50% - 162px);
  }

  .hero__cards {
    position: absolute;
    inset: 0;
    display: block;
  }

  .chip {
    position: absolute;
  }

  .chip--1 {
    top: 251px;
    left: 8px;
  }

  .chip--2 {
    top: 0;
    right: auto;
    left: 368px;
  }

  .chip--3 {
    top: 251px;
    right: auto;
    left: 368px;
  }

  .clients {
    padding: var(--space-32) 0 88px;
  }

  .clients__viewport::before,
  .clients__viewport::after {
    width: 240px;
  }

  .what-we-do {
    padding: 120px 0;
  }

  .what-we-do__inner {
    gap: 56px;
  }

  /* As drawn: 4 columns of 288; rows 208, 96, 208 so that each column splits where drawn.
     Card 40: those are minimums: a row grows with a longer text (French, German) instead of
     squeezing it, and the tiles of a row stretch together. */
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: minmax(208px, auto) minmax(96px, auto) minmax(208px, auto);
    grid-template-areas:
      "predictive scalable real-time interoperability"
      "fast-results scalable real-time interoperability"
      "fast-results scalable human-support human-support";
  }

  .bento__tile--text,
  .bento__tile--band,
  .bento__tile--human-support {
    min-height: 0;
  }

  .bento__tile--text,
  .bento__tile--accent {
    justify-content: space-between;
  }

  .bento__tile--band {
    padding-top: var(--space-24);
  }

  /* Card 40: the caption never rises onto the band (140 px). Each tile keeps under the band at
     least the gap English has there today (16 px, 22 px: the caption stays at the bottom), so
     English is unchanged and a longer caption makes the row grow. */
  .bento__tile--interoperability {
    padding-top: calc(140px + 16px);
  }

  .bento__tile--fast-results {
    padding-top: calc(140px + 22px);
  }

  .bento__band {
    height: 140px;
  }

  .bento__band--dusk img {
    top: -11.43%;
  }

  .proof {
    padding: 120px 0;
  }

  .proof__inner {
    display: grid;
    grid-template-columns: 640px 560px;
    grid-template-rows: auto auto;
    row-gap: 56px;
  }

  .proof__eyebrow {
    grid-column: 1 / -1;
  }

  .proof__statement {
    width: 600px;
    padding-top: 0;
  }

  .proof__figures {
    margin: 0;
  }
}

/* --- Reduced motion: no movement, the complete resting content -------------------------- */

@media (prefers-reduced-motion: reduce) {
  .typed__text::after {
    display: none;
  }

  .dial__sweep {
    display: none;
  }

  .clients__track {
    animation: none;
  }

  .clients__row[aria-hidden="true"] {
    display: none;
  }

  .clients__viewport {
    overflow-x: auto;
  }
}

/* ===========================================================================================
 * Landing part 2 (card 22): case studies, savings calculator, testimonials.
 * ======================================================================================== */

/* --- 06 Case studies ---------------------------------------------------------------------- */

.cases {
  padding: var(--space-64) 0;
  background: var(--color-white);
}

.cases__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: var(--space-40);
}

.case {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-navy-900);
  color: var(--color-white);
}

.case__photo {
  position: relative;
  z-index: -2;
  height: 280px;
}

.case__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case__photo::before,
.case__photo::after {
  content: "";
  position: absolute;
  inset: 0;
}

.case__photo::before {
  background: var(--gradient-case-shade);
}

.case__photo::after {
  background: var(--gradient-case-top) top / 100% 120px no-repeat,
    var(--gradient-case-bottom) bottom / 100% 180px no-repeat;
}

/* The strip is the case's button: the whole photo area. */
.case__strip {
  position: absolute;
  inset: 0 0 auto;
  height: 280px;
  display: block;
  width: 100%;
  text-align: left;
  color: var(--color-white);
}

.case__logo {
  position: absolute;
  top: 28px;
  left: var(--space-24);
  height: 40px;
  width: auto;
  max-width: 140px;
}

.case__result {
  position: absolute;
  bottom: var(--space-24);
  left: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.case__type {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--color-white-80);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.case__saving {
  color: var(--color-white-85);
  font-size: var(--text-metric-size);
  line-height: var(--text-metric-line);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.case__label {
  color: var(--color-white-80);
}

.case__name {
  position: absolute;
  right: var(--space-24);
  bottom: var(--space-24);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* The open panel (navy): readable without JavaScript; hidden while closed once the script runs. */
.case__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: var(--space-24);
}

[data-cases-ready] .case:not(.is-open):not(.is-closing) .case__panel {
  display: none;
}

/* Card 43: under 1280 px a panel grows and shrinks (landing.js), its content clipped meanwhile;
   the list does not scroll the page by itself while its height changes. */
.case.is-growing .case__panel {
  overflow: hidden;
}

.cases__list.is-growing {
  overflow-anchor: none;
}

/* Card 52 (3987:4608 and its twins): the same height in the four open cases, whatever the
   text: the logo in a 40 px slot, then the location, 92 in all under 1280 px. */
.case__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  min-height: 92px;
}

.case__logo-slot {
  display: flex;
  align-items: center;
  height: 40px;
}

.case__panel-logo {
  max-width: none;
}

.case__building {
  color: var(--color-slate-300);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.case__gauge-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.case__gauge {
  flex: none;
  width: 96px;
  height: 96px;
  fill: none;
  stroke-width: 8.64;
}

.case__gauge-track {
  stroke: var(--color-white-16);
}

.case__gauge-arc {
  stroke: var(--color-teal-400);
  stroke-dasharray: var(--saving) 100;
  stroke-linecap: round;
}

.case__figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  max-width: 188px;
  color: var(--color-teal-400);
}

.case__figure-number {
  font-size: var(--text-metric-size);
  line-height: var(--text-metric-line);
  font-weight: var(--weight-bold);
}

.case__figure-unit {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
}

.case__figure-label {
  flex-basis: 100%;
  color: var(--color-white);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.case__facts {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--space-8);
  min-height: 68px; /* card 52: two rows of chips (30 + 8 + 30), as drawn under 1280 px */
}

.case__fact {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: 5px var(--space-10);
  border-radius: var(--space-8);
  background: var(--color-white-10);
  color: var(--color-white-90);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.case__quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 230px; /* card 52: the quote, its photo and attribution at the bottom (no gap) */
  margin: 0;
}

/* Card 54: under 1280 px the four panels one height per language, sized for the longest quote
   (French and German at 390 px: 192 px of text and the 60 px photo row), so the photo row sits
   at the same distance from the panel's bottom in the four. */
html:lang(fr) .case__quote,
html:lang(de) .case__quote {
  min-height: 252px;
}

.case__who {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  min-height: 60px;
}

.case__portrait {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.case__person {
  color: var(--color-slate-300);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

/* Card 52: "Contact us", a teal button out of the panel. Under 1280 px: full width, right
   under the open case (the cases ordered 1, 3, 5, 7; the button after the open one, after the
   four when none is open). From 1280 px: the one below the cases, 265 wide, centred. */
.cases__list > .case:nth-child(1) {
  order: 1;
}

.cases__list > .case:nth-child(2) {
  order: 3;
}

.cases__list > .case:nth-child(3) {
  order: 5;
}

.cases__list > .case:nth-child(4) {
  order: 7;
}

.cases__contact--in-list {
  order: 8;
  width: 100%;
}

.cases__list:has(> .case:nth-child(1).is-open) .cases__contact--in-list {
  order: 2;
}

.cases__list:has(> .case:nth-child(2).is-open) .cases__contact--in-list {
  order: 4;
}

.cases__list:has(> .case:nth-child(3).is-open) .cases__contact--in-list {
  order: 6;
}

.cases__contact--below {
  display: none;
}

.case__close {
  position: absolute;
  top: var(--space-8);
  right: var(--space-8);
  width: var(--touch-target);
  height: var(--touch-target);
  color: var(--color-white);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
}

.case__close[hidden] {
  display: none;
}

/*
 * Under 1280 px (card 24): a permanent round cue, 44 px, top right of every card that opens:
 * "+" while closed, "×" while open. It is part of the strip (the button), so the panel's own
 * close button is not shown under 1280 (it stays from 1280, where the strip hides when open).
 */
.case__cue {
  position: absolute;
  top: var(--space-24);
  right: var(--space-24);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  border-radius: var(--radius-round);
  background: var(--color-white);
  color: var(--color-petrol-900);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
}

.case__cue-close,
.case.is-open .case__cue-open {
  display: none;
}

.case.is-open .case__cue-close {
  display: inline;
}

.case__close {
  display: none;
}

/* Open on mobile and tablet: the photo shrinks to 200, the panel follows. The photo shows
   alone, as in the open frames (Figma 3684:2680, 3684:2896, 3684:3128): the strip's logo, result
   and name fade out (still read: the strip keeps its name), so only the "×" cue stays on it. */
.case.is-open .case__photo,
.case.is-open .case__strip {
  height: 200px;
}

.case.is-open .case__logo,
.case.is-open .case__result,
.case.is-open .case__name {
  opacity: 0;
}

/* Card 43: under 1280 px the photo shrinks with the panel's growth (landing.js), over the same
   0.35 s and easing, so the case below moves smoothly; at once with reduced motion. */
@media (max-width: 1279px) and (prefers-reduced-motion: no-preference) {
  .case__photo,
  .case__strip {
    transition: height 0.35s ease;
  }
}

/* --- 07 Savings calculator ----------------------------------------------------------------- */

.calculator {
  padding: var(--space-64) 0;
  background: var(--color-white);
}

.calculator__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.calculator__inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
}

.calculator__step {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calculator__step-label {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: 0;
  color: var(--color-navy-900);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.calculator__step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--space-12);
  background: var(--color-teal-tint);
}

.calculator__types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-top: var(--space-14);
}

.type-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8);
  border-radius: var(--space-16);
  background: var(--color-grey-100);
  cursor: pointer;
}

.type-tile__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Card 43: the whole building, in its own 3:2, at most 160 px wide so that the 320 px file is
   twice the width on a 2x screen (no larger render exists); centred in its tile. */
.type-tile__render {
  width: 100%;
  max-width: 160px;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--space-10);
  object-fit: cover;
  opacity: 0.75;
}

.type-tile__label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: var(--touch-target);
  margin: calc(var(--space-8) * -1) 0;
  color: var(--color-navy-65);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

.type-tile .icon-check {
  display: none;
  width: 16px;
  height: 16px;
  color: var(--color-teal-700);
}

.icon-check__tick {
  stroke: var(--color-white);
}

.type-tile:has(:checked) {
  box-shadow: inset 0 0 0 2px var(--color-teal-700);
}

.type-tile:has(:checked) .type-tile__render {
  opacity: 1;
}

.type-tile:has(:checked) .type-tile__label {
  color: var(--color-navy-900);
}

.type-tile:has(:checked) .icon-check {
  display: block;
}

.type-tile:has(:focus-visible) {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* The floor-area slider: a native range input, its value in a bubble above the thumb. */
.slider {
  position: relative;
  height: 104px;
}

.slider__value {
  position: absolute;
  top: 8px;
  left: clamp(0px, calc(var(--position) * 1% - 42px + (12px - var(--position) * 0.24px)), calc(100% - 84px));
  width: 84px;
  height: 36px;
  border: 1px solid var(--color-grey-300);
  border-radius: var(--space-8);
  background: var(--color-white);
  box-shadow: var(--shadow-bubble);
  color: var(--color-navy-900);
  font-size: var(--text-label-size);
  line-height: 34px;
  font-weight: var(--weight-medium);
  text-align: center;
  white-space: nowrap;
}

.slider__input {
  position: absolute;
  top: 44px;
  left: 0;
  width: 100%;
  height: var(--touch-target);
  margin: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
}

.slider__input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-teal-700) calc(var(--position) * 1%), var(--color-slider-track) 0);
}

.slider__input::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--color-slider-track);
}

.slider__input::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--color-teal-700);
}

.slider__input::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border: 3px solid var(--color-teal-700);
  border-radius: 50%;
  background: var(--color-white);
  appearance: none;
}

.slider__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--color-teal-700);
  border-radius: 50%;
  background: var(--color-white);
}

.slider__min,
.slider__max {
  position: absolute;
  top: 84px;
  color: var(--color-navy-65);
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  white-space: nowrap;
}

.slider__min {
  left: 0;
}

.slider__max {
  right: 0;
}

.calculator__result {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  padding: var(--space-32) var(--space-20);
  border-radius: 20px;
  background: var(--color-navy-900);
  color: var(--color-white);
}

.calculator__photos {
  height: 152px;
  overflow: hidden;
  border-radius: var(--space-16);
}

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

.calculator__figures {
  display: flex;
  flex-direction: column;
}

.calculator__label {
  color: var(--color-teal-400);
  font-size: var(--text-eyebrow-size);
  line-height: var(--text-eyebrow-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--text-eyebrow-tracking);
  text-transform: uppercase;
}

.calculator__label--energy {
  margin-top: var(--space-20);
}

.calculator__savings,
.calculator__energy {
  margin-top: var(--space-4);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.calculator__energy {
  font-size: var(--text-menu-size);
  line-height: var(--text-menu-line);
}

.calculator__small,
.calculator__context {
  color: var(--color-slate-300);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  font-weight: var(--weight-regular);
}

.calculator__context {
  margin-top: var(--space-4);
}

.calculator__unit {
  margin-left: var(--space-4);
}

.calculator__button {
  width: 100%;
}

.calculator__promise {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.calculator__promise .icon-check {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--color-teal-700);
}

.calculator__footnote {
  margin-top: var(--space-24);
  color: var(--color-slate-500);
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
}

/* --- 08 Testimonials ----------------------------------------------------------------------- */

.testimonials {
  padding: var(--space-64) 0;
}

.contour--testimonials {
  top: -83.79px;
  left: -331.5px;
}

.testimonials__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.testimonials__viewport {
  touch-action: pan-y;
  /* Card 52: only the next card peeks, on the right; nothing shows left of the active card. */
  clip-path: inset(-100vh -100vw -100vh 0);
}

.testimonials__track {
  display: flex;
  gap: var(--space-24);
  transition: transform 0.45s ease;
}

.testimonial {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  min-height: 608px; /* card 52 (3985:977 and its twins): 350 x 608 on a phone */
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-white);
}

.testimonial:not(.is-active)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-navy-scrim);
}

.testimonial__figure {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin: 0;
  padding: var(--space-24);
}

/* Card 52: each logo at its drawn size, centred in a 56 px slot (the quote starts at the same
   height in every card). */
.testimonial__logo-slot {
  display: flex;
  align-items: center;
  height: 56px;
}

.testimonial__logo {
  width: calc(var(--logo-width) * 1px);
  height: calc(var(--logo-height) * 1px);
  max-width: none;
}

/* Logo and quote at the top, the person at the bottom (as drawn). */
.testimonial__quote {
  margin: var(--space-24) 0 auto;
  padding-bottom: var(--space-24);
  color: var(--color-petrol-900);
  font-size: var(--text-quote-size);
  line-height: var(--text-quote-line);
}

.testimonial__quote p {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
}

.testimonial__who {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  min-height: 68px; /* card 52: the row of 3985:1330, the 56 px photo centred in it */
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
}

.testimonial__photo {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.testimonial__person {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.testimonial__name {
  color: var(--color-petrol-900);
  font-weight: var(--weight-medium);
}

.testimonial__role {
  color: var(--color-slate-500);
}

.testimonials__controls {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.testimonials__controls[hidden] {
  display: none;
}

.testimonials__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--color-on-navy-border);
  border-radius: 26px;
  color: var(--color-white);
  font-size: var(--text-menu-size);
  line-height: var(--text-menu-line);
  font-weight: var(--weight-semibold);
}

.testimonials__arrow--next {
  border-color: var(--color-grey-300);
  background: var(--color-white);
  color: var(--color-navy-900);
}

.testimonials__counter {
  color: var(--color-on-navy-text);
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

/* Without JavaScript the nine cards are stacked and all readable (card 1's copy not shown). */
.testimonials:not([data-testimonials-ready]) .testimonials__track {
  flex-direction: column;
}

.testimonials:not([data-testimonials-ready]) .testimonial--peek {
  display: none;
}

.testimonials:not([data-testimonials-ready]) .testimonial::after {
  display: none;
}

/* --- Tablet: 768 to 1279 px (PM layout) ----------------------------------------------------- */

@media (min-width: 768px) {
  .cases,
  .calculator,
  .testimonials {
    padding: var(--space-80) 0;
  }

  .case__photo,
  .case__strip {
    height: 320px;
  }

  .calculator__types {
    grid-template-columns: repeat(3, 1fr);
  }

  .calculator__result {
    padding: var(--space-32) 36px;
  }

  .calculator__photos {
    height: 308px;
  }

  .calculator__savings {
    font-size: var(--text-h2-size);
    line-height: var(--text-h2-line);
  }

  .calculator__energy {
    font-size: var(--text-h3-size);
    line-height: var(--text-h3-line);
  }

  .testimonial__figure {
    padding: var(--space-40);
  }

  /* Card 52 (3984:92 and its twins): from 768 px the photo 72, the card at least 466 high. */
  .testimonial {
    min-height: 466px;
  }

  .testimonial__who {
    min-height: 0;
  }

  .testimonial__photo {
    width: 72px;
    height: 72px;
  }

  .testimonials__inner {
    position: relative;
  }
}

/* --- Desktop: from 1280 px, as drawn at 1512 ----------------------------------------------- */

/* --- Card 36: the hero heading in French and German ------------------------------------- */

/* French: "bâtiments performants." alone is 10.84 em, wider than the heading's two-line layout
   allows from 768 px (729 px for 688 at 768, 972 px for 644 from 1280). In French the heading
   keeps its phone layout, three lines (the typed phrase alone on the last one), at every width;
   from 1280 px at most 59 px, so its longest line fits the 644 px column beside the dial. */
@media (min-width: 768px) {
  html:lang(fr) .hero__title-visual .br-wide {
    display: none;
  }

  html:lang(fr) .hero__title-visual .br-narrow {
    display: inline;
  }
}

/* German: two lines fit up to 1279 px; from 1280 px "für weniger Emissionen." does not fit the
   644 px column (866 px), three lines do at the drawn size (9.61 em, 615 px). */
@media (min-width: 1280px) {
  html:lang(de) .hero__title-visual .br-wide {
    display: none;
  }

  html:lang(de) .hero__title-visual .br-narrow {
    display: inline;
  }

  html:lang(fr) .hero__title-visual,
  html:lang(de) .hero__title-visual {
    height: calc(3 * var(--text-hero-line));
  }

  html:lang(fr) .hero__title {
    font-size: min(var(--text-hero-size), 59px);
  }
}

@media (min-width: 1280px) {
  .cases {
    padding: 120px 0;
  }

  /* Four strips of 300 in a 1200 x 560 box; hover 360 / 280; open 840 / 120. */
  .cases__list {
    flex-direction: row;
    gap: 0;
    height: 560px;
    margin-top: 56px;
    overflow: hidden;
    border: 1px solid var(--color-grey-200);
    border-radius: var(--radius-card);
    background: var(--color-grey-100);
  }

  .case {
    flex: 300 1 0;
    min-width: 0;
    border-radius: 0;
    transition: flex-grow 0.35s ease;
  }

  .case + .case {
    box-shadow: inset 1px 0 0 var(--color-white-12);
  }

  /* Only a strip that opens widens on hover (card 23: a strip without content is static). */
  .cases__list:not(.has-open) .case[data-case]:hover {
    flex-grow: 360;
  }

  .cases__list:not(.has-open):has(.case[data-case]:hover) .case:not(:hover) {
    flex-grow: 280;
  }

  .cases__list.has-open .case {
    flex-grow: 120;
  }

  .cases__list.has-open .case.is-open {
    flex-grow: 840;
  }

  .case__photo,
  .case__strip,
  .case.is-open .case__photo,
  .case.is-open .case__strip {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .case__result {
    top: 440px;
    bottom: auto;
  }

  .case__saving {
    font-size: var(--text-metric-size);
    line-height: var(--text-metric-line);
  }

  .case__name {
    right: var(--space-24);
  }

  /* A narrow strip (120) while another case is open: name, flag, saving, label at the bottom. */
  .cases__list.has-open .case:not(.is-open) .case__logo,
  .cases__list.has-open .case:not(.is-open) .case__type {
    font-size: 0;
  }

  .cases__list.has-open .case:not(.is-open) .case__logo {
    display: none;
  }

  .cases__list.has-open .case:not(.is-open) .case__result {
    top: auto;
    bottom: 20px;
    left: 15px;
  }

  .cases__list.has-open .case:not(.is-open) .case__name {
    right: auto;
    left: 15px;
    bottom: 160px;
  }

  /* The open case: the photo on the left (364), the navy panel on the right (476). */
  .case.is-open .case__strip {
    pointer-events: none;
    visibility: hidden;
  }

  .case.is-open .case__photo {
    right: 476px;
  }

  .case.is-open .case__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 476px;
    padding: 51px 40px 49px 56px; /* card 54: 49 below the photo row, as drawn (40 before) */
    border-left: 1px solid var(--color-on-navy-rule);
    background: var(--color-navy-900);
  }

  /* Card 52 (3987:4226 and its twins): logo and location 72 high, the chips one row (30), the
     quote 206 high with the photo at its bottom. */
  .case__head {
    justify-content: space-between;
    gap: 0;
    height: 72px;
    min-height: 0;
  }

  .case__facts {
    min-height: 30px;
  }

  /* No block shrinks when a longer text (French, German) fills the panel: each keeps its height
     and the panel's bottom padding takes the extra lines. */
  .case__panel > * {
    flex-shrink: 0;
  }

  /* Card 54: the quote grows to the panel's bottom padding, so the photo row sits 49 px above
     the panel's bottom in the four cases and the three languages. */
  .case__quote,
  html:lang(fr) .case__quote,
  html:lang(de) .case__quote {
    flex: 1 1 auto;
    min-height: 206px;
  }

  /* Card 54: the box sized for the longest text of each language, the photo row 49 px above
     the bottom: 560 in English as drawn; 598 in French and German (their photo rows end 547
     px down at most, chips on two rows: 547 + 49 + 2 for the border). */
  html:lang(fr) .cases__list,
  html:lang(de) .cases__list {
    height: 598px;
  }

  .case__who {
    gap: var(--space-16);
    min-height: 0;
  }

  .cases__contact--in-list {
    display: none;
  }

  .cases__contact--below {
    display: flex;
    width: 265px;
    margin: 35px auto 0;
  }

  .case__cue {
    display: none;
  }

  .case__close {
    display: block;
  }

  .case.is-open .case__close {
    top: 10px;
    right: 10px;
  }

  [data-cases-ready] .case:not(.is-open) .case__panel {
    display: none;
  }

  .calculator {
    padding: 120px 0;
  }

  .calculator__card {
    position: relative;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    padding: 76px 24px 65px 56px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-calculator);
  }

  .calculator__inputs {
    flex: none;
    width: 560px;
  }

  .calculator__types {
    grid-template-columns: repeat(3, 170px);
  }

  .type-tile {
    height: 150px;
  }

  .calculator__result {
    width: 520px;
    margin-top: 35px;
  }

  /* Card 43: the photo is last in the card's markup (its order under 1280 px); on top here. */
  .calculator__photos {
    order: -1;
  }

  .calculator__footnote {
    margin-top: var(--space-24);
  }

  .testimonials {
    padding: 120px 0; /* card 52: 834 high as drawn, with the 466 cards (784 before) */
  }

  .contour--testimonials {
    top: calc(50% - 490px);
    left: 50%;
    transform: translateX(-50%);
  }

  .testimonials__inner {
    gap: 56px;
  }

  .testimonial {
    flex: 0 0 720px;
  }

  .testimonials__controls {
    position: absolute;
    top: 35px;
    left: 1043px;
  }
}

/* Reduced motion: no sliding, no auto-advance (landing.js), instant changes. */
@media (prefers-reduced-motion: reduce) {
  .testimonials__track,
  .case {
    transition: none;
  }
}

/* --- Card 36: German ---------------------------------------------------------------------- */

/* An open case's quote, hyphenated in German: at the drawn size, case 2's quote takes one line
   more than the panel has room for from 1280 px, and its "Kontakt aufnehmen" falls under the
   panel's edge. Hyphenated, it keeps the drawn lines (the page is lang="de"). */
html:lang(de) .case__quote {
  hyphens: auto;
}

/* "2,5 Mio. m²" is 4.9 em wide: at the drawn size it is wider than its cell on a phone and from
   1280 px. In German only, the four figures take at most their cell's width (20 % of it per
   em, so they stay one size); where there is room (768 to 1279 px) they keep the drawn size. */
html:lang(de) .proof__cell {
  container-type: inline-size;
}

html:lang(de) .proof__value {
  font-size: min(var(--proof-value-size), 20cqi);
}
