AltoCode

Grassano

HTML


<!-- ============================================ -->
<!--                    FORM                      -->
<!-- ============================================ -->

<section id="cta-1393">
    <div class="cs-container">
        <div class="cs-content">
            <span class="cs-topper">Iscriviti</span>
            <h2 class="cs-title">Iscriviti alla Newsletter</h2>
            <p class="cs-text">
                Iscriviti alla nostra newsletter e resta aggiornato con le ultime novità, offerte esclusive e aggiornamenti interessanti.
            </p>
            <form class="cs-form" name="Form Contatti" method="post">
                <input class="cs-input" type="email" id="cs-email-1393" name="email" placeholder="Indirizzo email">
                <button class="cs-button-solid cs-submit" type="submit">Iscriviti Ora</button>
            </form>
        </div>
        <picture class="cs-picture">
            <source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/developer.png">
            <source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/developer.png">
            <img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/developer.png" alt="persona che sorride" width="814" height="742">
        </picture>
        <div class="cs-bubbles" aria-hidden="true"></div>
    </div>
    <picture class="cs-background">
        <source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/abstract3-m.png">
        <source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/abstract3.png">
        <img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/MISC/abstract3.png" alt="" width="1920" height="486">
    </picture>
</section>

CSS


/*-- -------------------------- -->
<---           FORM             -->
<--- -------------------------- -*/

/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
    @keyframes floatAnimation {
        0% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-2rem);
        }
        100% {
            transform: translateY(0);
        }
    }
    @keyframes floatAnimation2 {
        0% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(3rem);
        }
        100% {
            transform: translateY(0);
        }
    }
    #cta-1393 {
        padding: var(--sectionPadding);
        padding-bottom: 0;
        position: relative;
        overflow: hidden;
        z-index: 1;
    }
    #cta-1393 .cs-container {
        width: 100%;
        max-width: 34.375rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(3rem, 6vw, 4rem);
        position: relative;
        z-index: 1;
    }
    #cta-1393 .cs-content {
        text-align: center;
        width: 100%;
        max-width: 32.625rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #cta-1393 .cs-title,
    #cta-1393 .cs-text {
        max-width: 31.25rem;
        color: var(--bodyTextColorWhite);
    }
    #cta-1393 .cs-text {
        margin-bottom: 2rem;
        opacity: 0.8;
    }
    #cta-1393 .cs-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        position: relative;
        z-index: 1;
    }
    #cta-1393 .cs-input {
        font-size: 1rem;
        width: 100%;
        height: clamp(2.875rem, 8vw, 4.5rem);
        margin: 0;
        padding: 0;
        padding-left: 1.25rem;
        border: none;
        border-radius: 5rem;
        box-sizing: border-box;
        display: block;
    }
    #cta-1393 .cs-input::placeholder {
        color: #767676;
    }
    #cta-1393 .cs-button-solid {
        font-size: 1rem;
        line-height: clamp(2.875rem, 5.5vw, 3.5rem);
        text-decoration: none;
        font-weight: 700;
        text-align: center;
        margin: 0;
        color: #fff;
        overflow: hidden;
        min-width: 9.375rem;
        padding: 0 2rem;
        background-color: var(--primary);
        border-radius: 5rem;
        display: inline-block;
        position: relative;
        z-index: 1;
        box-sizing: border-box;
    }
    #cta-1393 .cs-button-solid:before {
        content: "";
        position: absolute;
        height: 100%;
        width: 0%;
        background: #000;
        opacity: 1;
        top: 0;
        left: 0;
        z-index: -1;
        transition: width 0.3s;
    }
    #cta-1393 .cs-button-solid:hover {
        cursor: pointer;
    }
    #cta-1393 .cs-button-solid:hover:before {
        width: 100%;
    }
    #cta-1393 .cs-submit {
        width: 100%;
        border: none;
    }
    #cta-1393 .cs-picture {
        width: 85%;
        height: auto;
        margin-bottom: -0.625rem;
        display: block;
        position: relative;
        z-index: 1;
    }
    #cta-1393 .cs-picture img {
        width: 100%;
        height: auto;
    }
    #cta-1393 .cs-background {
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
    }
    #cta-1393 .cs-background img {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
    #cta-1393 .cs-bubbles {
        font-size: min(1.8vw, 0.65em);
        width: 50.875em;
        height: 46.375em;
        position: absolute;
        left: 50%;
        bottom: -12.5em;
        transform: translateX(-50%);
    }
    #cta-1393 .cs-bubbles:before {
        content: "";
        width: 36.9375em;
        height: 36.9375em;
        background: transparent;
        border: 1px solid #fff;
        border-radius: 50%;
        opacity: 1;
        position: absolute;
        display: block;
        bottom: 0;
        left: 0;
        animation-name: floatAnimation;
        animation-duration: 5s;
        animation-timing-function: ease-in-out;
        animation-fill-mode: forwards;
        animation-iteration-count: infinite;
    }
    #cta-1393 .cs-bubbles:after {
        content: "";
        width: 36.9375em;
        height: 36.9375em;
        background: var(--primary);
        border-radius: 50%;
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        z-index: -1;
        animation-name: floatAnimation2;
        animation-duration: 14s;
        animation-timing-function: ease-in-out;
        animation-fill-mode: forwards;
        animation-iteration-count: infinite;
    }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    #cta-1393 .cs-container {
        max-width: 80rem;
    }
    #cta-1393 .cs-input {
        width: 100%;
    }
    #cta-1393 .cs-submit {
        width: auto;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 0.5rem;
    }
    #cta-1393 .cs-picture {
        width: 50%;
    }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #cta-1393 {
        padding: clamp(6.25rem, 7vw, 8.125rem) 1rem;
    }
    #cta-1393 .cs-container {
        flex-direction: row;
        justify-content: flex-start;
    }
    #cta-1393 .cs-content {
        text-align: left;
        align-items: flex-start;
    }
    #cta-1393 .cs-picture {
        font-size: min(1vw, 1em);
        width: 42.8125em;
        height: 41.5625em;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        position: absolute;
        right: 0em;
        bottom: calc(clamp(6.625em, 12vw, 15em) * -1);
    }
    #cta-1393 .cs-picture img {
        height: 100%;
        width: auto;
    }
    #cta-1393 .cs-bubbles {
        font-size: min(0.9vw, 1em);
        left: auto;
        right: calc(clamp(3.125em, 5vw, 9.375em) * -1);
        bottom: calc(clamp(10em, 20vw, 23em) * -1);
        transform: none;
    }
}