AltoCode

Rimella + Servizi

HTML


<!-- ============================================ -->
<!--                    Hero                      -->
<!-- ============================================ -->

<section id="hero-996">
    <div class="cs-container">
        <div class="cs-content">
            <span class="cs-topper">Colazioni da gustare</span>
            <h1 class="cs-title"><span class="cs-color">Inizia</span> La Giornata Con Sapori Freschi</h1>
            <p class="cs-text">
                Profumo di caffè, prodotti appena sfornati e un'atmosfera accogliente. La colazione è un momento speciale, da vivere con calma e con il gusto di ciò che è preparato con cura.
            </p>
            <div class="cs-button-box">
                <a href="" class="cs-button-solid">Esplora Menù</a>
                <a href="" class="cs-button-transparent">Scopri di più</a>
            </div>
        </div>
        <ul class="cs-card-group">
            <li class="cs-item">
                <picture class="cs-icon-wrapper">
                    <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/oyster.svg" alt="icona" width="60" height="60">
                </picture>
                <h3 class="cs-h3">Speciale Pesce</h3>
                <p class="cs-item-text">
                    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Alias?
                </p>
            </li>
            <li class="cs-item">
                <picture class="cs-icon-wrapper">
                    <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/wine.svg" alt="icona" width="60" height="60">
                </picture>
                <h3 class="cs-h3">Selezione Vini</h3>
                <p class="cs-item-text">
                    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Alias?
                </p>
            </li>
            <li class="cs-item">
                <picture class="cs-icon-wrapper">
                    <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/bookmark.svg" alt="icona" width="60" height="60">
                </picture>
                <h3 class="cs-h3">Pachetti Mix</h3>
                <p class="cs-item-text">
                    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Alias?
                </p>
            </li>
            <li class="cs-item">
                <picture class="cs-icon-wrapper">
                    <img class="cs-icon" loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Icons/cake.svg" alt="icona" width="60" height="60">
                </picture>
                <h3 class="cs-h3">Party Feste</h3>
                <p class="cs-item-text">
                    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Alias?
                </p>
            </li>
        </ul>
    </div>

    <picture class="cs-background">
        <source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/landing-m.jpg">
        <source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/landing.jpg">
        <img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/landing.jpg" alt="ristorante" width="1920" height="1200" aria-hidden="true">
    </picture>
</section>

CSS


/*-- -------------------------- -->
<---           Hero             -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    #hero-996 {
        padding: clamp(12.5rem, 25.95vw, 18.75rem) 1rem 0;
        padding-bottom: 0;
        position: relative;
        z-index: 1;
        overflow: hidden;
    }
    #hero-996 .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(6.25rem, 25vw, 12.5rem);
    }
    #hero-996 .cs-content {
        width: 100%;
        max-width: 59.6875rem;
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        box-sizing: border-box;
    }
    #hero-996 .cs-topper {
        font-size: clamp(0.8125rem, 1.6vw, 1rem);
        line-height: 1.2em;
        white-space: nowrap;
        text-transform: uppercase;
        text-align: left;
        letter-spacing: 0.1rem;
        font-weight: 700;
        width: 100%;
        color: var(--bodyTextColorWhite);
        margin-bottom: 1.75rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 1.25rem;
        position: relative;
    }
    #hero-996 .cs-topper:after {
        content: "";
        width: 50%;
        max-width: 7.5rem;
        height: 1px;
        background: currentColor;
        opacity: 1;
        position: relative;
        display: block;
    }
    #hero-996 .cs-title {
        font-size: clamp(2.4375rem, 6.4vw, 5rem);
        font-weight: 900;
        line-height: 1.2em;
        text-align: left;
        width: 100%;
        max-width: 20ch;
        margin: 0 0 2rem 0;
        color: var(--bodyTextColorWhite);
        position: relative;
    }
    #hero-996 .cs-color {
        color: var(--primary);
    }
    #hero-996 .cs-text {
        font-size: clamp(1rem, 1.95vw, 1.25rem);
        line-height: 1.5em;
        text-align: left;
        width: 100%;
        max-width: 39.375rem;
        margin: 0 0 2rem 0;
        color: var(--bodyTextColorWhite);
    }
    #hero-996 .cs-button-box {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 1.25rem;
    }
    #hero-996 .cs-button-solid {
        text-align: center;
        font-size: 1rem;
        line-height: clamp(2.875rem, 5.5vw, 3.5rem);
        width: 11.25rem;
        text-decoration: none;
        font-weight: 700;
        margin: 0;
        color: #fff;
        padding: 0;
        background-color: var(--primary);
        display: inline-block;
        position: relative;
        z-index: 1;
        transition: color 0.3s;
    }
    #hero-996 .cs-button-solid:before {
        content: "";
        position: absolute;
        display: block;
        height: 100%;
        width: 0%;
        background: #fff;
        opacity: 1;
        top: 0;
        left: 0;
        z-index: -1;
        transition: width 0.3s;
    }
    #hero-996 .cs-button-solid:hover {
        color: #1a1a1a;
    }
    #hero-996 .cs-button-solid:hover:before {
        width: 100%;
    }
    #hero-996 .cs-button-transparent {
        font-size: 1rem;
        line-height: clamp(2.875rem, 5.5vw, 3.5rem);
        width: 11.25rem;
        height: clamp(2.875rem, 5.5vw, 3.5rem);
        text-decoration: none;
        font-weight: 700;
        margin: 0;
        color: #fff;
        padding: 0;
        background-color: transparent;
        border: 1px solid var(--bodyTextColorWhite);
        box-sizing: border-box;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 1;
        transition: color / 3s;
    }
    #hero-996 .cs-button-transparent:before {
        content: "";
        position: absolute;
        display: block;
        background: #fff;
        opacity: 1;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        z-index: -1;
        transform-origin: left;
        transform: scaleX(0);
        transition: transform 0.3s;
    }
    #hero-996 .cs-button-transparent:hover {
        color: #1a1a1a;
    }
    #hero-996 .cs-button-transparent:hover:before {
        transform: scaleX(1);
    }
    #hero-996 .cs-card-group {
        margin: 0;
        padding: var(--sectionPadding);
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: clamp(1rem, 2vw, 1.25rem);
        position: relative;
    }
    #hero-996 .cs-card-group:before {
        content: "";
        width: 100vw;
        height: 100%;
        border-top: 2px solid rgba(255, 255, 255, 0.5);
        background: rgba(26, 26, 26, 0.5);
        -webkit-backdrop-filter: blur(30px);
        backdrop-filter: blur(30px);
        opacity: 1;
        position: absolute;
        display: block;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }
    #hero-996 .cs-item {
        width: 100%;
        text-align: center;
        list-style: none;
        margin: 0;
        padding: 1.5rem;
        border: 1px solid rgba(255, 255, 255, 0.24);
        background-color: rgba(255, 255, 255, 0.06);
        box-sizing: border-box;
        grid-column: span 12;
        grid-row: span 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1;
        transition: border-color 0.3s;
    }
    #hero-996 .cs-item:before {
        content: "";
        width: 100%;
        height: 100%;
        background-color: #000;
        opacity: 0;
        position: absolute;
        display: block;
        top: 0;
        left: 0;
        z-index: -1;
        transition: opacity 0.6s;
    }
    #hero-996 .cs-item:hover {
        border-color: var(--primary);
    }
    #hero-996 .cs-item:hover:before {
        opacity: 1;
    }
    #hero-996 .cs-item:hover .cs-h3 {
        color: var(--bodyTextColorWhite);
    }
    #hero-996 .cs-item:hover .cs-item-text {
        color: var(--bodyTextColorWhite);
        opacity: 0.9;
    }
    #hero-996 .cs-item:hover .cs-background {
        opacity: 1;
    }
    #hero-996 .cs-icon-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #hero-996 .cs-icon {
        width: clamp(2.25rem, 6vw, 4rem);
        height: auto;
        margin: 0 0 1rem 0;
    }
    #hero-996 .cs-h3 {
        font-size: clamp(1.25rem, 2.5vw, 1.5625rem);
        line-height: 1.2em;
        font-weight: bold;
        margin: 0 0 0.5rem 0;
        color: var(--bodyTextColorWhite);
    }
    #hero-996 .cs-item-text {
        font-size: clamp(0.875rem, 1.5vw, 1rem);
        line-height: 1.5em;
        max-width: 18.75rem;
        margin: 0;
        padding: 0;
        color: var(--bodyTextColorWhite);
        opacity: 0.8;
    }
    #hero-996 .cs-background {
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -2;
    }
    #hero-996 .cs-background:before {
        content: "";
        width: 100%;
        height: 100%;
        background: linear-gradient(
            41deg,
            rgba(26, 26, 26, 0.9) 30%,
            rgba(26, 26, 26, 0.3) 100%
        );
        opacity: 1;
        position: absolute;
        display: block;
        top: 0;
        left: 0;
        z-index: 1;
        pointer-events: none;
    }
    #hero-996 .cs-background img {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}
/* Tablet - 600px */
@media only screen and (min-width: 37.5rem) {
    #hero-996 .cs-card-group .cs-item {
        grid-column: span 6;
    }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #hero-996 .cs-card-group .cs-item {
        grid-column: span 3;
    }
}
/* Parallax Effect - 1300px */
@media only screen and (min-width: 81.25rem) {
    #hero-996 {
        background: url("https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/landing.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
    #hero-996 .cs-background img {
        display: none;
    }
}