/* --- Variabili & Reset --- */
:root {
    --bg-color: #0D0D0D;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-1: #D2F000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

::selection {
    background: var(--accent-1);
    color: #0D0D0D;
}

::-moz-selection {
    background: var(--accent-1);
    color: #0D0D0D;
}

/* --- Layout Base --- */
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100dvh;
    width: 100vw;
    display: grid;
    place-items: center;
    position: relative;
    perspective: 1000px;
    overscroll-behavior: none;
}

/* Sfondo con gradiente radiale per dare profondità */
.ambient-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150vw;
    height: 150vh;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(210, 240, 0, 0.10) 0%, transparent 58%);
    z-index: 0;
    pointer-events: none;
    animation: glowBreathe 9s ease-in-out infinite alternate;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    z-index: 0;
    pointer-events: none;
}

/* --- Contenitore Hero --- */
.hero-container {
    position: relative;
    z-index: 1;
    text-align: center;
    width: min(90vw, 820px);
    height: 100dvh;
    padding: 0 1.6rem 20vh;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
    /* La transizione serve per rimettere a posto l'elemento quando il mouse esce dallo schermo */
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.hero-top {
    align-self: end;
    margin-bottom: clamp(0.9rem, 2.2vh, 1.7rem);
}

.hero-bottom {
    align-self: start;
    margin-top: clamp(1rem, 2.6vh, 2rem);
}

/* --- Tipografia & Elementi --- */
.hero-logo {
    width: min(145px, 40vw);
    height: auto;
    display: block;
    margin: 0 auto 1rem;
}

.hero-brand {
    font-size: clamp(1.02rem, 1.8vw, 1.45rem);
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

.brand-33 {
    color: var(--accent-1);
}

.hero-divider {
    width: min(410px, 66vw);
    height: 1px;
    margin: 0 auto 1.6rem;
    background-color: rgba(255, 255, 255, 0.22);
}

.hero-title {
    font-size: clamp(2rem, 4.9vw, 4.45rem);
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0;
}

.market-highlight {
    color: var(--accent-1);
}

.hero-slogan {
    font-size: clamp(0.98rem, 1.35vw, 1.16rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.01em;
    max-width: 620px;
    margin: 0 auto;
    text-wrap: balance;
}

.slogan-key {
    font-weight: 700;
    color: var(--text-primary);
}

.slogan-separator {
    width: 1px;
    height: 26px;
    margin: 1.05rem auto 0.9rem;
    background-color: rgba(255, 255, 255, 0.22);
}

.hero-inquiry {
    margin-top: 1.4rem;
    font-size: clamp(0.7rem, 0.95vw, 0.82rem);
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    line-height: 1.55;
    text-transform: uppercase;
}

.hero-email {
    position: relative;
    display: inline-block;
    margin-top: 0.25rem;
    font-size: clamp(1.02rem, 1.75vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--accent-1);
    text-decoration: none;
    text-shadow: 0 0 14px rgba(210, 240, 0, 0.32);
    transition: text-shadow 0.25s ease;
}

.hero-email::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 100%;
    height: 1px;
    background-color: var(--accent-1);
    transform: scaleX(1);
    transform-origin: left;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.hero-email:hover,
.hero-email:focus-visible {
    color: var(--accent-1);
    text-shadow: 0 0 16px rgba(210, 240, 0, 0.42);
}

.hero-email:hover::after,
.hero-email:focus-visible::after {
    opacity: 1;
}

.hero-datetime {
    margin-top: 0.35rem;
    font-size: clamp(0.62rem, 0.8vw, 0.74rem);
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
}

.hero-seconds {
    color: var(--accent-1);
}

.site-footer {
    position: absolute;
    bottom: max(1.1rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    width: min(90vw, 840px);
    pointer-events: auto;
}

.footer-note {
    font-size: clamp(0.62rem, 0.8vw, 0.74rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.footer-year {
    margin-top: 0.75rem;
    font-size: clamp(0.6rem, 0.74vw, 0.7rem);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.08em;
}

.speed-cursor,
.speed-cursor-tail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.speed-cursor {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent-1);
    box-shadow: 0 0 14px rgba(210, 240, 0, 0.42);
}

.speed-cursor-tail {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(210, 240, 0, 0.36) 0%, rgba(210, 240, 0, 0.16) 45%, rgba(210, 240, 0, 0.02) 72%, rgba(210, 240, 0, 0) 100%);
    transform-origin: center;
    filter: blur(0.4px);
}

.speed-cursor-tail::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(210, 240, 0, 0.16) 0%, rgba(210, 240, 0, 0.05) 48%, rgba(210, 240, 0, 0) 100%);
    filter: blur(4px);
}

@media (pointer: fine) {

    body,
    a,
    button,
    [role='button'],
    input,
    textarea,
    select,
    label {
        cursor: none;
    }

    body.cursor-active .speed-cursor,
    body.cursor-active .speed-cursor-tail {
        opacity: 1;
    }

    body.cursor-hover .speed-cursor {
        box-shadow: 0 0 18px rgba(210, 240, 0, 0.55);
    }
}

/* --- Animazioni d'ingresso (CSS Puro) --- */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggering: ritardi diversi per farli apparire a cascata */
.hero-logo.animate-up {
    animation-delay: 0.2s;
}

.hero-brand.animate-up {
    animation-delay: 0.28s;
}

.hero-divider.animate-up {
    animation-delay: 0.34s;
}

.hero-title.animate-up {
    animation-delay: 0.4s;
}

.hero-slogan.animate-up {
    animation-delay: 0.6s;
}

.slogan-separator.animate-up {
    animation-delay: 0.66s;
}

.hero-inquiry.animate-up {
    animation-delay: 0.7s;
}

.hero-datetime.animate-up {
    animation-delay: 0.92s;
}

.footer-note.animate-up {
    animation-delay: 0.86s;
}

.footer-year.animate-up {
    animation-delay: 0.98s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowBreathe {
    from {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.8;
    }
    to {
        transform: translate(-50%, -50%) scale(1.12);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-background {
        animation: none;
    }
}

@media (max-width: 768px) {
    .hero-container {
        width: 94vw;
        height: 100dvh;
        padding: 0 1rem 8vh;
    }

    .hero-logo {
        width: min(100px, 30vw);
        margin-bottom: 0.6rem;
    }

    .hero-brand {
        font-size: clamp(0.92rem, 3.1vw, 1.1rem);
        letter-spacing: 0.14em;
        margin-bottom: 0.6rem;
    }

    .hero-divider {
        width: min(280px, 72vw);
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: clamp(1.5rem, 8.2vw, 2.35rem);
        line-height: 1.08;
    }

    .hero-slogan {
        font-size: clamp(0.82rem, 3.4vw, 0.94rem);
        line-height: 1.58;
        max-width: 92%;
    }

    .slogan-separator {
        height: 20px;
        margin: 0.8rem auto 0.72rem;
    }

    .hero-inquiry {
        margin-top: 1.1rem;
        font-size: clamp(0.64rem, 2.5vw, 0.74rem);
        letter-spacing: 0.07em;
    }

    .hero-email {
        font-size: clamp(0.96rem, 4.3vw, 1.2rem);
    }

    .site-footer {
        bottom: max(0.7rem, env(safe-area-inset-bottom));
        width: 94vw;
    }

    .footer-note {
        font-size: clamp(0.56rem, 2.1vw, 0.64rem);
        letter-spacing: 0.07em;
    }

    .hero-datetime {
        font-size: clamp(0.56rem, 2.1vw, 0.64rem);
        letter-spacing: 0.09em;
        margin-top: 0.2rem;
    }

    .footer-year {
        font-size: clamp(0.54rem, 2vw, 0.62rem);
        margin-top: 0.26rem;
    }
}