/* EnerFrame responsive refinement — controlled typography, image captions and mobile layout */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body.visual-refresh .chapter-content,
body.visual-refresh .hero-copy,
body.visual-refresh .section-top > *,
body.visual-refresh .closing-grid > *,
body.visual-refresh .footer-main > * {
  min-width: 0;
}

body.visual-refresh h1,
body.visual-refresh h2,
body.visual-refresh h3,
body.visual-refresh h4,
body.visual-refresh p,
body.visual-refresh strong,
body.visual-refresh a,
body.visual-refresh button {
  overflow-wrap: break-word;
}

/* Keep long translated hero lines inside the copy column. */
body.visual-refresh .hero-copy .display {
  max-width: 100%;
  font-size: clamp(48px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.055em;
  overflow-wrap: normal;
  word-break: normal;
}

/* Keep the desktop introduction as two clearly separated panels. */
@media (min-width: 1201px) {
  body.visual-refresh .hero .chapter-content {
    grid-template-columns: minmax(540px, .9fr) minmax(0, 1.1fr);
  }

  body.visual-refresh .hero-copy {
    align-items: flex-start;
    width: 100%;
    padding-inline: clamp(42px, 4.4vw, 68px);
    text-align: left;
  }

  html[lang="de"] body.visual-refresh .hero-copy .display {
    width: 100%;
    max-width: 440px;
    font-size: clamp(48px, 4vw, 56px);
    line-height: 1;
    letter-spacing: -.05em;
  }

  html[lang="de"] body.visual-refresh .hero-copy .lead {
    width: 100%;
    max-width: 475px;
  }
}

html[lang="de"] body.visual-refresh .hero-copy .display,
html[lang="nl"] body.visual-refresh .hero-copy .display,
html[lang="es"] body.visual-refresh .hero-copy .display {
  font-size: clamp(46px, 4.6vw, 64px);
}

/* Captions remain readable without sitting on top of photography. */
body.visual-refresh .method-visual,
body.visual-refresh .gap-visual {
  height: auto;
  display: grid;
  grid-template-rows: auto auto;
  background: var(--navy);
}

body.visual-refresh .method-visual::after,
body.visual-refresh .gap-visual::after {
  display: none;
}

body.visual-refresh .method-visual img,
body.visual-refresh .gap-visual img {
  position: relative;
  width: 100%;
  height: clamp(330px, 42vw, 570px);
  object-fit: cover;
}

body.visual-refresh .method-visual figcaption,
body.visual-refresh .gap-visual figcaption {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(210px, .5fr);
  gap: 28px;
  align-items: end;
  padding: 28px 32px 30px;
  color: #fff;
  background: var(--navy);
}

body.visual-refresh .method-visual figcaption strong,
body.visual-refresh .gap-visual figcaption strong {
  max-width: 760px;
  font-size: clamp(23px, 2.6vw, 38px);
  line-height: 1.08;
}

body.visual-refresh .method-visual figcaption span,
body.visual-refresh .gap-visual figcaption span {
  max-width: 330px;
  color: #d2e2da;
  font-size: 11px;
  line-height: 1.65;
  text-align: right;
}

/* The global editorial footer rule must not wash out the dark contact footer. */
body.visual-refresh .site-footer {
  color: #dce8e1;
  background: #0d2e27;
}

@media (max-width: 1200px) {
  body.visual-refresh .hero .chapter-content {
    grid-template-columns: 1fr;
  }

  body.visual-refresh .hero-visual {
    min-height: clamp(500px, 58vw, 680px);
  }

  body.visual-refresh .hero-copy .display,
  html[lang="de"] body.visual-refresh .hero-copy .display,
  html[lang="nl"] body.visual-refresh .hero-copy .display,
  html[lang="es"] body.visual-refresh .hero-copy .display {
    max-width: 760px;
    font-size: clamp(48px, 7vw, 72px);
  }

  body.visual-refresh .hero-copy {
    padding-right: var(--pad);
  }
}

@media (max-width: 720px) {
  html,
  body {
    overflow-x: hidden;
  }

  body.visual-refresh .topbar .nav {
    height: auto;
    min-height: 0;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 12px;
    padding: 10px 0 9px;
  }

  body.visual-refresh .topbar .nav-end {
    grid-column: 2;
    grid-row: 1;
    gap: 8px;
    justify-content: flex-end;
  }

  body.visual-refresh .topbar .menu {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    gap: 34px;
    width: 100%;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.12);
  }

  body.visual-refresh .topbar .menu a {
    min-height: 30px;
    padding: 4px 0;
    font-size: 10px;
    text-align: center;
  }

  body.visual-refresh .topbar .mini-cta {
    width: auto;
    max-width: 124px;
    min-height: 42px;
    padding-inline: 9px;
    font-size: 9px;
    line-height: 1.2;
    white-space: normal;
  }

  body.visual-refresh .language-switcher {
    flex: 0 0 auto;
  }

  body.visual-refresh .hero-copy {
    padding: 58px 20px 54px;
  }

  body.visual-refresh .hero-copy .display,
  html[lang="de"] body.visual-refresh .hero-copy .display,
  html[lang="nl"] body.visual-refresh .hero-copy .display,
  html[lang="es"] body.visual-refresh .hero-copy .display {
    max-width: 100%;
    font-size: clamp(40px, 12.5vw, 58px);
    letter-spacing: -.05em;
  }

  body.visual-refresh .hero-copy .lead {
    font-size: 15px;
    line-height: 1.65;
  }

  body.visual-refresh .hero-actions,
  body.visual-refresh .result-actions {
    width: 100%;
  }

  body.visual-refresh .hero-actions .primary,
  body.visual-refresh .closing .primary {
    width: 100%;
    justify-content: space-between;
  }

  body.visual-refresh .hero-visual {
    min-height: 390px;
  }

  body.visual-refresh .hero-stamp {
    max-width: calc(100% - 40px);
    transform: none;
  }

  html[lang="de"] body.visual-refresh .hero-copy .display {
    font-size: clamp(39px, 11.5vw, 52px);
  }

  body.visual-refresh .headline,
  body.visual-refresh .world-copy h2,
  body.visual-refresh .closing h2,
  #quick-scan .qsv2-top h2,
  #quick-scan .qsv2-intro-main h3,
  #quick-scan .qsv2-question,
  #quick-scan .qsv3-followup-head h3,
  #quick-scan .qsv3-success h3 {
    max-width: 100%;
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.04;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body.visual-refresh .method-visual,
  body.visual-refresh .gap-visual {
    margin-top: 44px;
  }

  body.visual-refresh .method-visual img,
  body.visual-refresh .gap-visual img {
    height: clamp(250px, 72vw, 360px);
  }

  body.visual-refresh .method-visual figcaption,
  body.visual-refresh .gap-visual figcaption {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 23px 20px 25px;
  }

  body.visual-refresh .method-visual figcaption strong,
  body.visual-refresh .gap-visual figcaption strong {
    font-size: clamp(22px, 7vw, 31px);
  }

  body.visual-refresh .method-visual figcaption span,
  body.visual-refresh .gap-visual figcaption span {
    max-width: 100%;
    text-align: left;
  }

  body.visual-refresh .gap-stage-label {
    right: 18px;
    left: 18px;
    width: fit-content;
    max-width: calc(100% - 36px);
    line-height: 1.45;
    white-space: normal;
  }

  body.visual-refresh .gap-missing-inner,
  body.visual-refresh .compass-node,
  body.visual-refresh .approach-domain,
  body.visual-refresh .approach-result,
  body.visual-refresh .approach-choice,
  body.visual-refresh .service-card,
  body.visual-refresh .application,
  body.visual-refresh .foundation-card,
  body.visual-refresh .cycle-step {
    min-width: 0;
  }

  body.visual-refresh .approach-result,
  body.visual-refresh .approach-choice span,
  body.visual-refresh .service-card h3,
  body.visual-refresh .application h3,
  body.visual-refresh .foundation-card h4,
  body.visual-refresh .cycle-step h3 {
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  #quick-scan .qsv2-intro-main,
  #quick-scan .qsv2-intro-side,
  #quick-scan .qsv2-panel,
  #quick-scan .qsv2-result,
  #quick-scan .qsv3-deep,
  #quick-scan .qsv3-contact,
  #quick-scan .qsv3-deep-result {
    min-width: 0;
  }

  #quick-scan .qsv2-start,
  #quick-scan .qsv3-submit {
    width: 100%;
    justify-content: center;
    padding-inline: 16px;
    white-space: normal;
    text-align: center;
  }

  #quick-scan input,
  #quick-scan select,
  #quick-scan textarea,
  #quick-scan button {
    max-width: 100%;
  }

  .site-footer .footer-main,
  .site-footer .footer-legal {
    min-width: 0;
  }

  body.visual-refresh .site-footer .brand-name,
  body.visual-refresh .site-footer .brand-name small {
    display: block;
  }
}

@media (max-width: 520px) {
  body.visual-refresh .shell {
    width: min(calc(100% - 24px), var(--max));
  }

  body.visual-refresh .topbar .nav-end {
    gap: 5px;
  }

  body.visual-refresh .language-switcher button {
    width: 25px;
    height: 25px;
  }

  body.visual-refresh .language-switcher .flag-icon {
    width: 19px;
    height: 13px;
  }

  body.visual-refresh .topbar .mini-cta {
    max-width: 112px;
    min-height: 40px;
    padding-inline: 7px;
    font-size: 8px;
  }

  body.visual-refresh .approach-choice {
    grid-template-columns: 1fr;
  }

  body.visual-refresh .approach-choice > strong {
    grid-column: auto;
  }

  body.visual-refresh .approach-results {
    grid-template-columns: 1fr;
  }

  body.visual-refresh .decision-compass {
    min-height: 680px;
  }

  body.visual-refresh .compass-caption {
    width: calc(100% - 30px);
    text-align: center;
    white-space: normal;
  }

  #quick-scan .qsv2-process {
    grid-template-columns: 1fr;
  }

  #quick-scan .qsv2-process div:not(:last-child)::after {
    display: none;
  }

  #quick-scan .qsv2-nav {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  #quick-scan .qsv2-nav button,
  #quick-scan .qsv2-nav .qsv2-next {
    width: 100%;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
