/* =============================================
    RESET & VARIABILI
==============================================*/

:root {
    font-size: 1rem;
    font-family: 'Clash Display', sans-serif;
    font-weight: normal;

    --text-primary: white;
    --text-secondary: #313131;
    --bg-primary: rgb(14, 14, 14);
    --bg-secondary: #fff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}


/* =============================================
    TIPOGRAFIA BASE
==============================================*/

h1,
h2,
h3,
h4 {
    margin: 0;
    padding: 0;
}

h1 {
    padding: 40px 0;
    font-size: 22cqw;
    background-image: url('../media/hero.jpg');
    background-size: contain;
    color: transparent;
    -webkit-background-clip: text;
}

h2 {
    font-weight: 400;
    font-size: 24px;
}

h3 {
    font-weight: 200;
    padding-bottom: 2em;
}

h5 {
    font-size: .9em;
    margin-bottom: 0;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #ea6703e6;
}

svg {
    width: 32px;
    height: 32px;
}


/* =============================================
    lAYOUT GENERALE
==============================================*/

.container-fluid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    width: 100%;
    background-color: var(--bg-primary);
}


/* ===============================
   PRELOADER
==================================*/
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-size: 3rem;
  font-weight: bold;
  letter-spacing: 2px;
  animation: pulse 1.5s infinite;
  color: #f95700;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.loader-logo {
  font-family: 'Segoe UI', Arial, sans-serif;
}

body.preloading .site-wrapper { 
  opacity: 0;
}
.site-wrapper { 
  opacity: 1;
  transition: opacity .4s ease;
}

#preloader {
  z-index: 2147483647;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =============================================
    NAVBAR
==============================================*/

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 2.5em 2em;
    border-bottom: 1px solid var(--text-secondary);
    max-width: 100%;
}

.navbar img {
    visibility: hidden;
}

.navbar svg {
    transition: transform 0.7s ease-in-out;
}

.navbar svg:hover {
    transform: rotate(180deg);
}

.navbar> :first-child {
    justify-self: start;
}

.navbar> :nth-child(2) {
    justify-self: center;
}

.navbar> :last-child {
    justify-self: end;
}

.contactButton {
    visibility: hidden;
    border: 1px solid var(--text-primary);
    border-radius: 100px;
    padding: 0.7em 2em;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    z-index: 0;
}

.contactButton span {
    position: relative;
    z-index: 1;
}

.contactButton::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.contactButton:hover {
    color: #000;
}

.contactButton:hover::before {
    transform: scaleX(1);
}


/* =============================================
    HERO
==============================================*/

.hero {
    text-align: center;
}

.heroSubtitile svg {
    color: #cc7a3be6;
    width: 24px;
    height: 24px;
}

.heroSubtitile p {
    color: #8f582f;
    padding-bottom: 40px;
    font-size: .7em;
}

.hero-video {
    object-fit: cover;
    width: 90cqw;
    height: 70vh;
    border-radius: 10px;
}

.hero-video-tint-wrapper {
    position: relative;
    display: inline-block;
}

.hero-video+.tint-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 102, 0, 0.116);
    pointer-events: none;
    border-radius: 10px;
}


/* =============================================
    FULLSCREEN MENU
==============================================*/

#fullscreen-menu {
    position: fixed;
    inset: 0;
    background: black;
    color: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 2.5em 2em 8em;
}

#fullscreen-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-logo {
    visibility: hidden;
}

.overlay-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    margin-bottom: 2em;
}

.overlay-grid .overlay-logo {
    justify-self: center;
    width: 36px;
}

#close-menu {
    justify-self: end;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

#fullscreen-menu ul {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

#fullscreen-menu ul li {
    margin: 20px 0;
    font-size: 24px;
}

#fullscreen-menu ul li a {
    text-decoration: none;
    color: white;
    transition: color 0.3s;
    font-weight: bold;
}

#fullscreen-menu ul li a:hover {
    color: #ea6703e6;
}


/* =============================================
    SECTION CHI SIAMO
==============================================*/

.history-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4em 0;
}

.history-section h2 {
    font-size: 6.5cqw;
    font-weight: bold;
    padding: 50px 0 30px 0;
    color: #cc7a3be6;
}

.history-section p {
    text-align: center;
    padding: 0 40px;
}


/* =============================================
    SECTION SERVIZI
==============================================*/

.services {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4em 40px;
}

.service-container {
    margin-top: 2em;
    display: grid;
    row-gap: 2em;
    grid-template-columns: auto;
}

.service-container>div {
    display: flex;
    flex-direction: column;
}

.service-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* =============================================
    SECTION LAVORI
==============================================*/

.work {
    padding: 4em 40px;
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    background-color: blue;
    background-image: url('../media/parallax.jpg');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
}

.work h2 {
    grid-column: 1 / span 2;
    font-size: 6.5cqw;
    font-weight: bold;
    color: #cc7a3be6;
    display: flex;
    align-items: end;
    padding: 1em 0;
}

.work-container .item {
    display: flex;
    align-items: center;
    padding-bottom: 2em;
}

.work-container .item h2 {
    text-align: end;
    margin: 20px;
}

.work-parallax-wrapper {
    position: relative;
    height: 100vh;
    overflow: hidden;
}


/* =============================================
    SECTION BLOG
==============================================*/
.blog-desktop-version {
    display: none;
}

.blog {
    display: flex;
    flex-direction: column;
    padding: 4em 20px;
}

.blog h2 {
    font-size: 6.5cqw;
    font-weight: bold;
    color: #cc7a3be6;
    padding: 1em 0 2em;
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1em;
    row-gap: 2em;
}

.blog-container>div {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 10px;
}

.blog-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog h5 {
    visibility: hidden;
}


/* =============================================
    SECTION CONTATTI
==============================================*/

.contact {
    padding: 8em 20px;
}

.contact h2 {
    font-size: 6.5cqw;
    font-weight: bold;
    color: #cc7a3be6;
    padding-bottom: 1em;
}

input,
textarea {
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    border-radius: 4px;
    border: none;
    background-color: #252525;
    color: #ccc;
}

textarea {
    height: 150px;
    resize: none;
}

.form-button {
    border: 1px solid var(--text-primary);
    border-radius: 4px;
    padding: .7em 2em;
    font-weight: bold;
    margin-top: 20px;
    width: 100%;
}

.form-button:active {
    background-color: #ef7b23e6;
    border: none;
}


/* =============================================
    FOOTER
==============================================*/

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 20px;
    text-align: center;
    border-top: 1px solid #888;
}

footer h2 {
    padding: 10px 0;
}

footer h4 {
    font-weight: normal;
}

footer p {
    margin: 0;
    font-size: 0.8em;
    line-height: 0;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 20px;
}

.contact-info {
    text-align: left;
}

.time-info {
    text-align: right;
}

footer ul {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin: 0;
}

footer ul li {
    list-style: none;
    border-top: 1px solid var(--text-primary);
    border-bottom: 1px solid var(--text-primary);
    width: 25px;
    padding: 5px 0;
}

footer ul li i {
    font-size: 20px;
}

.facebook,
.facebook:hover,
.facebook:active {
    color: #1877f2;
}

ul li:has(a.facebook),
ul li:has(a.facebook:hover),
ul li:has(a.facebook:active) {
    border-top-color: #1877f2;
    border-bottom-color: #1877f2;
}

.linkedin,
.linkedin:hover,
.linkedin:active {
    color: #0a66c2;
}

ul li:has(a.linkedin),
ul li:has(a.linkedin:hover),
ul li:has(a.linkedin:active) {
    border-top-color: #0a66c2;
    border-bottom-color: #0a66c2;
}

.instagram,
.instagram:hover,
.instagram:active {
    color: #c32aa3;
}

ul li:has(a.instagram),
ul li:has(a.instagram:hover),
ul li:has(a.instagram:active) {
    border-top-color: #c32aa3;
    border-bottom-color: #c32aa3;
}

.google,
.google:hover,
.google:active {
    color: #ea4335;
}

ul li:has(a.google),
ul li:has(a.google:hover),
ul li:has(a.google:active) {
    border-top-color: #ea4335;
    border-bottom-color: #ea4335;
}


/* ====================================
   MEDIA QUERIES
==================================== */

/* Tablet (iPad) */
@media (min-width: 768px) {

    /****** SERVIZI ********/

    .services {
        padding: 4em 80px;
    }

    .service-container img {
        width: 100%;
        height: 300px;
        object-fit: cover;
    }

    /****** LAVORI ********/

    .work-container .item {
        padding-bottom: 4em;
        padding-left: 20px;
        padding-right: 20px;
    }

    /****** BLOG ********/

    .blog {
        padding: 4em 40px;
    }

    .blog-container {
        padding: 0 40px;
        column-gap: 2em;
    }

    /****** CONTATTI ********/

    .contact {
        padding: 8em 40px;
    }

    .contact-form {
        padding: 0 40px;
    }

    .contact p {
        padding: 0 40px;
    }

    /****** FOOTER ********/

    footer {
        padding: 0 40px;
    }

    footer ul {
        display: flex;
        justify-content: center;
        padding: 15px 0;
        margin: 0;
    }

    footer ul li {
        list-style: none;
        border-top: 1px solid var(--text-primary);
        border-bottom: 1px solid var(--text-primary);
        width: 25px;
        padding: 5px 0;
        margin: 0 1.5em;
    }
}

/* Desktop */
@media (min-width: 1024px) {

    /****** BASE ********/

    .container-fluid {

        height: 100%;
        width: 100%;
        background-color: var(--bg-primary);
    }

    .site-wrapper {

        max-width: 1600px;
        margin: 0 auto;
        width: 100%;
        container-type: inline-size;
    }

    .container-fluid::before {
        left: 0;
    }

    .container-fluid::after {
        right: 0;
    }

    /****** NAVBAR ********/

    .navbar img {
        visibility: visible;
    }

    /****** STORIA ********/

    .history-section h2 {
        font-size: 5cqw;
    }

    .contactButton {
        visibility: visible;
    }

    .history-section p {
        text-align: center;
        width: 50%;
    }

    /******** SERVIZI **********/

    .service-container {
        margin-top: 2em;
        width: 70%;
        display: grid;
        row-gap: 2em;
        grid-template-columns: repeat(3, 1fr);
    }

    .item2 {
        grid-column: 2 / span 2;
        text-align: end;
        align-items: flex-end;
        padding-left: 2em;
    }

    .item3 {
        grid-column: 1 / span 2;
        padding-right: 2em;
    }

    .item4 {
        text-align: end;
        align-items: flex-end;
    }

    .service-container img {
        height: 300px;
    }


    /*********** LAVORI ************/

    .work {
        padding: 4em 80px;
        display: grid;
        grid-template-columns: 1fr 2fr;
        grid-template-rows: auto auto;
        max-width: 1600px;
        margin: 0 auto;

    }


.full-bleed {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;              /* per gli overlay */
  overflow: clip;                  /* limita il repaint */
  background-image: url('../media/parallax.jpg');
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: cover;          /* ⬅️ NO background-attachment: fixed */
  /* ⛔️ rimosse le box-shadow pesanti */
}

/* Overlay leggeri al posto delle box-shadow inset */
.full-bleed::before,
.full-bleed::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 120px;
  pointer-events: none;
}

.full-bleed::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
}

.full-bleed::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
}

    .work>div {
        grid-column: 2 / span 2;
    }

    .work h2 {
        grid-column: 1 / span 2;
        font-size: 5cqw;
        font-weight: bold;
        color: #cc7a3be6;
    }

    .work-container .item {
        display: flex;
        align-items: center;
        padding: 2em;
    }

    .work-container .item h2 {
        font-size: 4cqw;
        text-align: end;
        margin: 20px 40px 0;
    }


    /*********** BLOG ************/

    .blog.mobile-version {
        display: none;
    }

    .blog-desktop-version h2 {
        font-size: 5cqw;
        font-weight: bold;
        color: #cc7a3be6;
        padding: 1em 0 2em;
    }

    .blog-desktop-version {
        display: flex;
        flex-direction: column;
        padding: 4em 80px;
    }

    .image-gallery {
        display: grid;
        min-height: 60vh;
        max-height: 100vh;
        width: 70cqw;
        aspect-ratio: 16 / 9;
        gap: 1.5em;
        grid-template-rows: 8fr 2fr;
        align-self: center;
        max-height: 100%;
    }

    .featured-wrapper {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    #featured {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
        aspect-ratio: 4 / 3;
    }

    .thumbnails {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 1em;
        width: 100%;
    }

    .thumbnails img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 10px;
        cursor: pointer;
        opacity: 0.7;
        transition: 0.3s ease;
    }

    .thumbnails img:hover,
    .thumbnails img.active {
        opacity: 1;
        transform: scale(1.05);
    }


    /*********** CONTATTO ************/

    .contact {
        padding: 8em 80px;
    }

    .contact h2 {
        font-size: 5cqw;
    }

.container-fluid::before,
.container-fluid::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: max((100vw - 1600px) / 2, 0px);
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4), rgba(0,0,0,0.2));
    pointer-events: none;
    z-index: 1;
}

    /****** FOOTER ********/

    footer p {
        margin: 0;
        font-size: 1rem;
        line-height: 0;
        color: #ccc;
    }

    .facebook,
    .linkedin,
    .instagram,
    .google {
        color: #ccc;
    }


    ul li:has(a.facebook),
    ul li:has(a.linkedin),
    ul li:has(a.instagram),
    ul li:has(a.google) {
        border-top-color: #ccc;
        border-bottom-color: #ccc;
    }
}