AltoCode
Foppolo

HTML
<!-- ============================================ -->
<!-- Hero -->
<!-- ============================================ -->
<section id="hero-2149">
<div class="cs-container">
<div class="cs-content">
<span class="cs-topper">Il racconto fotografico del vostro matrimonio</span>
<h1 class="cs-title">Scatti sinceri per raccontare l’emozione di un giorno unico</h1>
<p class="cs-text">
La fotografia diventa il filo che unisce questi momenti, trasformandoli in ricordi da custodire nel tempo.
</p>
<a href="" class="cs-button-solid cs-button1">Prenota Appuntamento</a>
</div>
</div>
<picture class="cs-background">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/wedding16.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/wedding16.jpg">
<img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/wedding16.jpg" alt="sposi" width="1920" height="907" aria-hidden="true">
</picture>
</section>
CSS
/*-- -------------------------- -->
<--- Hero -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
#hero-2149 {
padding: clamp(18.75rem, 54vw, 25rem) 1rem clamp(3.75rem, 7.5vw, 6.25rem) 1rem;
overflow: hidden;
position: relative;
z-index: 1;
}
#hero-2149 .cs-container {
width: 100%;
max-width: 80rem;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
}
#hero-2149 .cs-content {
text-align: center;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
#hero-2149 .cs-title {
font-size: clamp(2.4375rem, 5vw, 3.8125rem);
max-width: 30ch;
}
#hero-2149 .cs-title,
#hero-2149 .cs-text {
color: var(--bodyTextColorWhite);
}
#hero-2149 .cs-text {
font-size: clamp(1rem, 2vw, 1.25rem);
max-width: 55ch;
margin-bottom: 2rem;
opacity: 0.8;
}
#hero-2149 .cs-button-solid {
font-size: 1rem;
font-weight: 700;
line-height: clamp(2.875rem, 5.5vw, 3.5rem);
text-align: center;
text-decoration: none;
min-width: 12.5rem;
margin: 0;
box-sizing: border-box;
padding: 0 clamp(2rem, 4vw, 3rem);
background-color: var(--primary);
color: var(--bodyTextColorWhite);
display: inline-block;
position: relative;
z-index: 1;
transition: color 0.3s;
}
#hero-2149 .cs-button-solid:before {
content: "";
width: 0%;
height: 100%;
background: #ffffff;
opacity: 1;
position: absolute;
top: 0;
left: 0;
z-index: -1;
transition: width 0.3s;
}
#hero-2149 .cs-button-solid:hover {
color: var(--headerColor);
}
#hero-2149 .cs-button-solid:hover:before {
width: 100%;
}
#hero-2149 .cs-background {
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
z-index: -2;
}
#hero-2149 .cs-background:before {
content: "";
width: 100%;
height: 100%;
background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%);
pointer-events: none;
opacity: 1;
display: block;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
#hero-2149 .cs-background img {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
}
}