<section class="hero">
  <div class="inner-text">
    <p class="p1">FWCA SA</p>
    <p class="p2">Fiduciaire.</p>
    <p class="subtitle">Votre partenaire pour une réussite durable</p>
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Abhaya Libre";
  text-align: center;
  color: #f5f5f5;
}

.hero {
  background: url("https://fwca.ch/wp-content/uploads/2024/07/close-up-businessman-with-digital-tablet-scaled.jpg")
    no-repeat center;
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.75);
  background-blend-mode: multiply;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 15px; /* Add some padding for smaller screens */
}

.inner-text {
  font-size: 40px; /* Initial font size */
  text-align: center;
  padding: 0 15px; /* Ensure padding is added for all screens */
  @media only screen and (min-width: 680px) {
    font-size: 50px;
  }
  @media only screen and (min-width: 950px) {
    font-size: 75px;
  }
}

.p1 {
  display: inline-block;
  font-size: 1.9em;
  font-weight: 900;
  margin: 0;
  line-height: 1;
  @media only screen and (max-width: 465px) {
    display: block;
    position: relative;
    top: 0; /* Adjusted position */
    left: 0; /* Adjusted position */
    transform: none; /* Removed transformation */
    margin-top: 20px; /* Add some margin for better spacing */
  }
}

.p2 {
  display: inline-block;
  font-size: 1.2em;
  font-weight: 100;
  margin: 0;
  line-height: 1;
  color: #87975e;
  @media only screen and (max-width: 465px) {
    position: relative;
    top: 0.6em;
    display: block; /* Ensure it displays as a block for better spacing */
  }
}

.subtitle {
  font-size: 0.7em; /* Smaller font size */
  font-weight: 300;
  margin: 1.5em;
  line-height: 2;
  color: #f5f5f5;
}

.hero-down {
  position: absolute;
  bottom: 0;
  font-size: 2em;
  width: 2em;
  height: 2em;
  color: #f5f5f5;
  border-radius: 100%;
  &:hover,
  &:focus {
    color: #ccc;
  }
  &:active {
    color: #f5f5f5;
  }
  .btn-react {
    background-color: #f5f5f5;
    height: 100%;
    width: 100%;
    border-radius: 100%;
    opacity: 0;
    position: absolute;
  }
  i {
    vertical-align: bottom;
    position: relative;
    top: 0.1em;
  }
}
View Compiled
$(function () {
  $(".p2").typed({
    strings: ["Fiduciaire", "Business Advisory", "Assurances"],
    typeSpeed: 50,
    backSpeed: 10,
    backDelay: 2000,
    showCursor: false,
    loop: true
  });
});

$(".hero-down").mousedown(function () {
  TweenMax.fromTo(
    ".btn-react",
    0.25,
    {
      opacity: 0,
      scale: 0
    },
    {
      opacity: 0.25,
      scale: 1,
      onComplete: function () {
        TweenMax.to(".btn-react", 0.25, {
          opacity: 0,
          scale: 0
        });
      }
    }
  );
});

// smooth scroll to div
$("a[href*=#]:not([href=#])").click(function () {
  if (
    location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") &&
    location.hostname == this.hostname
  ) {
    var target = $(this.hash);
    target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
    if (target.length) {
      $("html,body").animate(
        {
          scrollTop: target.offset().top
        },
        1000
      );
      return false;
    }
  }
});

External CSS

  1. //fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900
  2. https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;700&amp;display=swap"rel="stylesheet
  3. //maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
  4. //maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  2. //cdnjs.cloudflare.com/ajax/libs/typed.js/1.1.1/typed.min.js
  3. //cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js