html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #fffefb;
}

a {
    text-decoration: none;
}

/* Keyboard focus indicator (a11y) */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid #5B00DB;
    outline-offset: 3px;
    border-radius: 2px;
}

/* Make sure skip link is reachable */
.visually-hidden-focusable:focus,
.visually-hidden-focusable:focus-visible {
    z-index: 2000;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .img.home img:hover,
    .img.home video:hover { filter: none; }
    .overlay-text { transition: none; }
}

/* Image rendering hints */
img, video { max-width: 100%; height: auto; }

/* ---------------------------------------------------------
   Interactive: scroll reveal
   Elements with data-reveal start hidden + offset and ease in
   when they enter the viewport (a class is toggled by index.js).
--------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
    transition:
        opacity 1s cubic-bezier(0.22, 0.6, 0.36, 1),
        transform 1s cubic-bezier(0.22, 0.6, 0.36, 1);
    will-change: opacity, transform;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
/* Stagger inside a row: each child reveals slightly after the previous one */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
    transition:
        opacity 1s cubic-bezier(0.22, 0.6, 0.36, 1),
        transform 1s cubic-bezier(0.22, 0.6, 0.36, 1);
    will-change: opacity, transform;
}
[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translate3d(0,0,0); }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: translate3d(0,0,0); }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.24s; opacity: 1; transform: translate3d(0,0,0); }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.36s; opacity: 1; transform: translate3d(0,0,0); }

/* ---------------------------------------------------------
   Interactive: parallax inner image
   Wrap an <img> with .parallax-host and the script will
   translate it on scroll for a subtle depth effect.
--------------------------------------------------------- */
.parallax-host {
    overflow: hidden;
}
.parallax-host > img,
.parallax-host > video {
    transform: scale(1.08) translate3d(0, 0, 0);
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ---------------------------------------------------------
   Interactive: ring / vibrate on the footer "0885" number
--------------------------------------------------------- */
@keyframes ring0885 {
    0%   { transform: rotate(0); }
    2%   { transform: rotate(-14deg); }
    4%   { transform: rotate(12deg); }
    6%   { transform: rotate(-10deg); }
    8%   { transform: rotate(8deg); }
    10%  { transform: rotate(-6deg); }
    12%  { transform: rotate(4deg); }
    14%  { transform: rotate(-2deg); }
    16%  { transform: rotate(0); }
    100% { transform: rotate(0); }
}
.footer-ring {
    display: inline-block;
    transform-origin: 50% 85%;
    animation: ring0885 6s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
    backface-visibility: hidden;
    perspective: 1000px;
}
.footer-ring:hover {
    animation-duration: 1.5s;
}

/* Reduced-motion overrides for the new effects */
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal-stagger] > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .parallax-host > img,
    .parallax-host > video {
        transform: none !important;
    }
    .footer-ring { animation: none !important; }
}

.img {
    max-height: 95vh;
}

.img.home{
    height: 75vh;
}

.img-fluid.start {
    height: 90vh;
}

.svg{
    height: 100rem;
}
.row.video {
    height: 90vh;
}

.img.home img,
.img.home video {
    position: relative;
    transition: all 0.3s ease;
}

/* Overlay di testo nascosto inizialmente */
.overlay-text {
    font-family: "Red Hat Display", sans-serif;
    font-weight: 800;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fffefb;
    font-size: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 3; /* Aggiunto z-index per assicurare visibilità */
}

/* Effetto hover: scurisce l'immagine o il video */
.img.home img:hover,
.img.home video:hover {
    filter: brightness(0.5);
}

/* Mostra il testo in hover */
.img.home:hover .overlay-text {
    opacity: 1;
}

.navbar {
    background-color: rgba(255, 254, 251, 0.5);
    backdrop-filter: blur(0.1rem);
    height: 8vh;
}


.nav-link {
    font-family: "Red Hat Display", sans-serif;
    color: #141414;
    font-weight: 700;
}

.nav-link.active {
    color: #5B00DB !important; /* Colore del link attivo (pagina corrente) */
    font-weight: 800; /* Aumenta lo spessore del testo */
}

/* Stilizzazione del navbar-toggler */
.navbar-toggler,
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
    outline: none;
    box-shadow: none;
    border: 0;
}

body {
    padding-top: 70px;
}

footer {
    background-color: #e60404;
    margin: 0;
    padding: 0;
    position: relative;
}

.row.title {
    border-top: 1px solid #5B00DB;
    border-bottom: 1px solid #5B00DB;
}

.desktop-only {
    display: none;
}

.space{
    margin-top: 14vh;
    margin-bottom: 2vh;
}

/* Impostazioni Font */
h1, .h1 {
    font-size: 1.2rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 800;
    color: #141414;
    text-transform: uppercase;
    margin: 0;
}

.footer-title {
    font-size: 2rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 800;
    color: #fffefb;
    margin: 0;
    line-height: 95%;
}

.footer-description{
    font-size: 0.9rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 500;
    color: #fffefb;
}

.copyright-text {
    position: absolute;
    bottom: 1vh;
    color: #fffefb;
    font-size: 0.9rem;
}

h2 {
    font-size: 1rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 700;
    color: #141414;
    margin: 0;
}

.h3 {
    font-size: 1.3rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 700;
    color: #141414;
    margin: 0;
}

.h4
{
    font-size: 1rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 700;
    color: #141414;
    margin: 0;
}

.h4:hover {
    color:#5B00DB;
}

p, .p {
    font-size: 1.1rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 400;
    color: #141414;
}

.copyright {
    font-size: 0.7rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 400;
    color: #141414;
    transition: color 0.3s ease;
}

.copyright:hover {
    color: #a3a3a3;
}

.imgright {
    font-size: 1rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 400;
    color: #a3a3a3;
}

.p.grey {
    color: #a3a3a3;
    border-bottom: 1px solid #ff0303;
}

.h5 {
    font-size: 1rem;
    font-family: "Red Hat Display", sans-serif;
    font-weight: 500;
    color: #141414;
}

.empiria .container-fluid,
.empiria .row,
.empiria .img,
.empiria .img-fluid {
  background-color: #191919;
  padding-top: 0.5rem; /* Spazio sopra */
  padding-bottom: 0.5rem;
}


/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    
    .desktop-only {
        display: inline;
    }

    .space{
        margin-bottom: 4vh;
    }

    p, .p {
        font-size: 1rem;
    }

    h1, .h1 {
        font-size: 1.7rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .img-fluid.start {
        height: 95vh;
        width: 100vw;
        object-fit: cover;
    }

    
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {

}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {

    
    h1, .h1 {
        font-size: 2.3rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .nav-link:hover {
        color: #5B00DB;
    }

    .footer-title {
        font-size: 2.5rem;
    }
    
    .footer-description{
        font-size: 0.9rem;
    }
    
    .copyright-text {
        bottom: 3vh;
        font-size: 0.9rem;
    }
}

/* X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    h1, .h1 {
        font-size: 2.5rem;
    }

    p, .p {
        font-size: 1.4rem;
    }
}
