/* ==========================================================================
   RESET E BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; width: 100%; overscroll-behavior-x: none; scroll-behavior: smooth; }
body {
    background: #0a0a0a;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    overscroll-behavior-x: none;
}

/* ==========================================================================
   NAVBAR
   Fissa in alto, trasparente con leggero blur: resta sempre visibile
   durante lo scroll, come nei siti "veri".
   ========================================================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 40px;
    background: linear-gradient(rgba(40,24,12,0.5), rgba(20,13,8,0.4));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232,142,41,0.12);
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
    font-family: 'Space Grotesk', sans-serif;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    font-weight: 500;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: #e88e29;
    transition: width 0.3s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }

@media (max-width: 600px) {
    .site-nav { padding: 16px 20px; align-items: flex-start; }
    .nav-links { gap: 16px; align-items: flex-start; padding-top: 2px; }
    .nav-links a { font-size: 0.65rem; letter-spacing: 0.1em; }
}

/* ==========================================================================
   REVEAL ON SCROLL
   Ogni elemento con .reveal parte leggermente rimpicciolito, sfocato e
   trasparente; quando entra in vista JS aggiunge .is-visible e sfuma
   dentro in modo morbido — l'effetto "entrata in scena" tipo Apple.
   Attivato una sola volta per elemento (non si ripete allo scroll-back).
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(46px) scale(0.92);
    filter: blur(10px);
    transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
                transform 0.65s cubic-bezier(0.16,1,0.3,1),
                filter 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}
.reveal-card:nth-child(even) { transition-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ==========================================================================
   POLVERE AMBIENTALE (bokeh)
   Layer fisso, z-index basso: resta dietro alle card e ai video,
   si vede solo negli spazi vuoti tra le sezioni. Le mote sono generate
   via JS con posizione/dimensione/durata randomiche.
   ========================================================================== */
.ambient-dust {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.dust-mote {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(170,230,255,0.95) 40%, rgba(110,205,255,0) 75%);
    animation-name: dustDrift, moteTwinkle;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
}

@keyframes moteTwinkle {
    0%, 100% { box-shadow: 0 0 8px 2px rgba(170,230,255,0.5); }
    50%      { box-shadow: 0 0 20px 5px rgba(200,240,255,0.95); }
}

@keyframes dustDrift {
    0%   { transform: translate(0, 0) scale(0.8); opacity: 0; }
    15%  { opacity: var(--op); transform: translate(calc(var(--dx) * 0.15), calc(var(--dy) * 0.15)) scale(1); }
    85%  { opacity: var(--op); }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.8); opacity: 0; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    z-index: 1;
}

.hero-image-clip {
    position: absolute;
    inset: 0;
    clip-path: polygon(40% 0%, 100% 0%, 100% 100%, 15% 100%);
    mask-image: linear-gradient(110deg, transparent 35%, black 65%);
    -webkit-mask-image: linear-gradient(110deg, transparent 35%, black 65%);
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.hero-image-clip::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, #0a0a0a 100%);
    pointer-events: none;
}

.cinematic-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 58px 58px;
    mix-blend-mode: overlay;
    transition: transform 0.25s ease-out;
    will-change: transform;
}

.hero-cursor-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(320px circle at 50% 50%, rgba(232,142,41,0.07), transparent 70%);
}

/* --- Gizmo orbit --- */
.hero-gizmo {
    position: absolute;
    top: 32px;
    right: 32px;
    display: none;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 3;
}

.gizmo-plate {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.15) 60%, transparent 78%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gizmo-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}
.gizmo-ring-outer { width: 112px; height: 112px; border: 1.2px solid rgba(255,255,255,0.22); }
.gizmo-ring-inner { width: 80px; height: 80px; border: 1px solid rgba(255,255,255,0.1); }

#gizmoCanvas { position: relative; z-index: 1; width: 140px; height: 140px; }

.gizmo-label {
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    letter-spacing: 0.28em;
    margin-top: 4px;
}

@media (min-width: 640px) {
    .hero-gizmo { display: flex; top: 110px; right: 56px; }
}

/* --- contenuto testo --- */
.logo-container {
    position: absolute;
    top: 20%;
    left: 80px;
    z-index: 5;
    width: 400px;
    text-align: left;
}

.section-tag {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: #e88e29;
    letter-spacing: 0.3em;
    margin-bottom: 22px;
    display: block;
    opacity: 1;
}
/* solo nella home (hero + titolo progetti) la tag riparte nascosta e
   entra in scena in coreografia col resto — ovunque altrove resta
   semplicemente visibile fin da subito */
#heroContent .section-tag,
.trigger-projects .section-tag {
    opacity: 0;
}
.start-animation .section-tag { animation: elegantFadeSlide 0.5s ease-out forwards 0.2s; }

.main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    letter-spacing: 2px;
    line-height: 1.05;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 28px;
    filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
    transition: color 0.4s ease;
}
.start-animation .main-title { animation: blurFadeStrong 1.1s ease-out forwards; }

.hero-art-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.3rem, 3vw, 2.1rem);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 30px;
    display: block;
}

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    will-change: transform, opacity;
}
.start-animation .hero-art-title .char {
    animation: cinematicCharIn 0.5s cubic-bezier(.2,.8,.2,1) forwards;
}
.start-animation .hero-art-title .char:nth-child(1)  { animation-delay: 0.55s; }
.start-animation .hero-art-title .char:nth-child(2)  { animation-delay: 0.60s; }
.start-animation .hero-art-title .char:nth-child(3)  { animation-delay: 0.65s; }
.start-animation .hero-art-title .char:nth-child(4)  { animation-delay: 0.70s; }
.start-animation .hero-art-title .char:nth-child(5)  { animation-delay: 0.75s; }
.start-animation .hero-art-title .char:nth-child(6)  { animation-delay: 0.80s; }
.start-animation .hero-art-title .char:nth-child(7)  { animation-delay: 0.85s; }
.start-animation .hero-art-title .char:nth-child(8)  { animation-delay: 0.90s; }
.start-animation .hero-art-title .char:nth-child(9)  { animation-delay: 0.95s; }
.start-animation .hero-art-title .char:nth-child(10) { animation-delay: 1.00s; }
.start-animation .hero-art-title .char:nth-child(11) { animation-delay: 1.05s; }
.start-animation .hero-art-title .char:nth-child(12) { animation-delay: 1.10s; }
.start-animation .hero-art-title .char:nth-child(13) { animation-delay: 1.15s; }

.about-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: #a0aab0;
    line-height: 1.75;
    opacity: 0;
    transform: translateY(14px);
}
.start-animation .about-text {
    animation: epicTextReveal 0.8s ease-out forwards 1.15s;
}

.hero-cta-row {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
    opacity: 0;
}
.start-animation .hero-cta-row { animation: fadeInText 0.8s ease-out forwards 1.5s; }

.hero-cta-btn {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    color: #fff;
    font-size: 12px;
    letter-spacing: 3px;
    padding: 16px 32px;
    border: 1px solid rgba(232,142,41,0.45);
    background: #0a0a0a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.hero-cta-btn:hover { transform: scale(1.05); border-color: rgba(232,142,41,0.8); }



/* ==========================================================================
   BLEND HERO -> RESTO DELLA PAGINA
   Nessuna tinta: solo la stessa sfumatura verso il colore di sfondo,
   estesa un po' più in basso perché il passaggio resti impercettibile.
   ========================================================================== */
.hero-bleed {
    position: relative;
    width: 100%;
    height: 220px;
    margin-top: -220px;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(to bottom, transparent 0%, #0a0a0a 100%);
}

/* ==========================================================================
   TRAILER
   ========================================================================== */
.trailer-section {
    width: 100%;
    padding: 110px 40px 70px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.trailer-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trailer-title { text-align: center; }

.trailer-description-top {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #a0aab0;
    max-width: 720px;
    text-align: center;
    margin: 0 auto 46px;
}

.trailer-video-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; }

.flip-card {
    width: min(1150px, 100%, 52vh * 16 / 9);
    perspective: 2000px;
    margin: 0 auto;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    transition: transform 0.9s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform;
}
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.flip-card-face video { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-card-back { transform: rotateY(180deg) translateZ(0); }

/* mentre il video ruota, i controlli nativi (che il browser mobile a volte
   non riesce a trasformare in 3D correttamente) vengono nascosti — 
   ricompaiono appena l'animazione finisce (vedi script.js) */
.flip-card.is-animating .flip-card-face video { pointer-events: none; }

.flip-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 12px 28px;
    background: #0a0a0a;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(232,142,41,0.45);
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.flip-btn:hover { transform: scale(1.05); border-color: rgba(232,142,41,0.8); color: #fff3e6; }
.flip-btn i { color: #e88e29; transition: transform 0.6s ease; }
.flip-card.is-flipped ~ .flip-btn i { transform: rotate(180deg); }

.trailer-video {
    width: 100%;
    max-width: 1150px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    display: block;
}

.trailer-cta-wrapper { margin-top: 30px; display: flex; justify-content: center; }

.play-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #f2a94a, #d4791a);
    color: #0a0a0a;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    box-shadow: 0 0 0 rgba(232,142,41,0.5);
    animation: playPulse 2.6s ease-in-out infinite;
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.play-btn i { font-size: 0.75rem; }
.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.play-btn:hover::before { left: 130%; }
.play-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.15);
    box-shadow: 0 0 30px rgba(242,169,74,0.8);
}
@keyframes playPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(232,142,41,0.45); }
    50% { box-shadow: 0 0 22px rgba(232,142,41,0.6); }
}
@media (max-width: 900px) {
    .play-btn { padding: 10px 24px; font-size: 0.72rem; letter-spacing: 2px; gap: 8px; }
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding: 11px 28px;
    background: #0a0a0a;
    color: #fff;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid rgba(232,142,41,0.45);
    transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.card-cta:hover { transform: scale(1.05); border-color: rgba(232,142,41,0.8); color: #fff3e6; }
.card-cta-arrow { font-size: 0.7rem; transition: transform 0.25s ease; }
.card-cta:hover .card-cta-arrow { transform: translateX(4px); }

/* ==========================================================================
   PROGETTI
   ========================================================================== */
.projects-section {
    width: 100%;
    margin-top: 60px;
    padding: 0 0 140px 0;
    position: relative;
    z-index: 1;
}

.projects-container { width: 100%; max-width: 1500px; margin: 0 auto; }

.projects-tag { text-align: center; }

.projects-main-title {
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 70px;
}
.projects-main-title .char { opacity: 0; transform: translateY(25px); }
.start-animation .projects-main-title .char { animation: cinematicCharIn 0.6s ease-out forwards; }
.start-animation .projects-main-title .char:nth-child(1)  { animation-delay: 0.00s; }
.start-animation .projects-main-title .char:nth-child(2)  { animation-delay: 0.05s; }
.start-animation .projects-main-title .char:nth-child(3)  { animation-delay: 0.10s; }
.start-animation .projects-main-title .char:nth-child(4)  { animation-delay: 0.15s; }
.start-animation .projects-main-title .char:nth-child(5)  { animation-delay: 0.20s; }
.start-animation .projects-main-title .char:nth-child(6)  { animation-delay: 0.25s; }
.start-animation .projects-main-title .char:nth-child(7)  { animation-delay: 0.30s; }
.start-animation .projects-main-title .char:nth-child(8)  { animation-delay: 0.35s; }
.start-animation .projects-main-title .char:nth-child(9)  { animation-delay: 0.40s; }
.start-animation .projects-main-title .char:nth-child(10) { animation-delay: 0.45s; }
.start-animation .projects-main-title .char:nth-child(11) { animation-delay: 0.50s; }

.projects-subtitle {
    margin-left: 16px;
    opacity: 0;
}
.start-animation .projects-subtitle { animation: elegantFadeSlide 0.5s ease-out forwards 0.6s; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 64px 48px;
    padding: 0 80px;
}

.project-card {
    background: #0a0a0a;
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    position: relative;
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.19,1,0.22,1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.media-container { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #000; position: relative; line-height: 0; }
.project-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }

.project-info { padding: 34px 40px 40px; background: #0a0a0a; border-top: 1px solid rgba(255,255,255,0.06); }

.project-index {
    font-family: 'Courier Prime', monospace;
    font-size: 0.78rem;
    color: #e88e29;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 14px;
    opacity: 0.85;
}

.project-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.55rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.project-divider {
    width: 40px;
    height: 2px;
    background: rgba(232,142,41,0.55);
    margin: 18px 0;
    transition: width 0.5s ease, background 0.5s ease;
}

.project-info p {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.7;
    color: #a0aab0;
}

.project-list { list-style: none; margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.project-list li {
    position: relative;
    padding-left: 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #a0aab0;
}
.project-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 1px;
    background: #e88e29;
}
.project-list li strong { color: #fff; font-weight: 700; }

@media (min-width: 769px) {
    .project-card:hover {
        transform: translateY(-10px);
        border-color: rgba(232,142,41,0.45);
        box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 50px rgba(232,142,41,0.16);
        z-index: 100;
    }
    .project-card:hover .project-media { transform: scale(1.02); }
    .project-card:hover .project-divider { width: 70px; background: rgba(232,142,41,0.9); }
}

@media (min-width: 1400px) { .projects-grid { padding: 0 40px; } }

/* ==========================================================================
   RIQUADRO "BONUS" — al posto della card nella griglia progetti, visivamente
   diverso dalle card normali (niente video), rimanda alla sezione bonus
   ========================================================================== */
.bonus-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    min-height: 280px;
    padding: 40px;
    background: #0a0a0a;
    border: 1px dashed rgba(90,169,230,0.4);
    text-decoration: none;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.bonus-tile:hover {
    border-color: rgba(90,169,230,0.75);
    background: rgba(90,169,230,0.06);
    transform: translateY(-4px);
}
.bonus-tile-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(90,169,230,0.45);
    color: #5aa9e6;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.bonus-tile .section-tag { margin-bottom: 0; color: #5aa9e6; }
.bonus-tile h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    margin: 0;
}
.bonus-tile p {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #a0aab0;
    margin: 0;
}
.bonus-tile-arrow {
    color: #5aa9e6;
    font-size: 0.85rem;
    margin-top: 6px;
    transition: transform 0.3s ease;
}
.bonus-tile:hover .bonus-tile-arrow { transform: translateY(4px); }

/* ==========================================================================
   SEZIONE BONUS — il sito stesso come progetto
   ========================================================================== */
.bonus-section {
    width: 100%;
    padding: 80px 40px 120px;
    display: flex;
    justify-content: center;
}
.bonus-container {
    max-width: 800px;
    text-align: center;
}
.bonus-container .section-tag { color: #5aa9e6; }
/* font/dimensione ereditati da .projects-main-title (stesso stile dei
   titoli principali del sito); qui solo l'aggiustamento di margine */
.bonus-title { margin-bottom: 30px; }
.bonus-text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #a0aab0;
    text-align: left;
    margin-bottom: 24px;
}
.bonus-text:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .bonus-tile { min-height: 220px; padding: 30px 24px; }
    .bonus-section { padding: 60px 24px 90px; }
}

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes blurFadeStrong {
    0%   { filter: blur(30px); opacity: 0; transform: translateY(20px); }
    100% { filter: blur(0px);  opacity: 1; transform: translateY(0); }
}
@keyframes cinematicCharIn {
    0%   { opacity: 0; transform: translateY(20px); text-shadow: 0 0 0 rgba(255,255,255,0); }
    60%  { opacity: 1; transform: translateY(-3px);  text-shadow: 0 0 12px rgba(255,255,255,0.25); }
    100% { opacity: 1; transform: translateY(0);      text-shadow: 0 0 8px rgba(255,255,255,0.15); }
}
@keyframes elegantFadeSlide {
    0%   { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes epicTextReveal {
    0%   { opacity: 0; transform: translateY(30px); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0);     filter: blur(0px); }
}
@keyframes fadeInText {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .hero-image-clip {
        position: relative;
        width: 100%;
        height: 55vh;
        clip-path: none;
        mask-image: linear-gradient(to bottom, black 68%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 68%, transparent 100%);
    }

    .hero-image-clip::after {
        background: linear-gradient(to bottom, transparent 60%, #0a0a0a 100%);
    }

    /* effetti pensati per il mouse: su touch non hanno senso e coprirebbero il testo sotto l'immagine */
    .hero-grid-overlay,
    .hero-cursor-glow,
    .hero-gizmo {
        display: none;
    }

    .logo-container {
        position: relative;
        width: 100%;
        max-width: 100%;
        padding: 30px 25px 50px;
        text-align: center;
        left: auto;
        top: auto;
    }
    .main-title, .hero-art-title, .about-text { text-align: center; }
    .hero-cta-row { flex-direction: column; justify-content: center; align-items: center; gap: 18px; }

    .hero-bleed { height: 180px; margin-top: -180px; }

    .trailer-section { padding: 90px 20px 60px; }
    .trailer-description-top { margin-bottom: 45px; }
    .play-btn { padding: 15px 32px; letter-spacing: 2px; font-size: 0.85rem; }

    .projects-tag, .projects-main-title { padding-left: 0; text-align: center; }
    .projects-main-title { font-size: clamp(1.3rem, 3vw, 2.1rem); letter-spacing: 2px; }
    .projects-subtitle { display: block; margin-left: 0; margin-top: 8px; }
    .projects-grid { grid-template-columns: 1fr; padding: 0 20px; gap: 40px; }
    .project-info { padding: 26px 24px 30px; }
    .project-info h3 { font-size: 1.3rem; }
    .project-card:hover { transform: none; }

    .footer-links { flex-direction: column; gap: 18px; }
    .footer-title { font-size: 1.5rem; margin-bottom: 14px; }
    .footer-text { font-size: 0.85rem; margin-bottom: 34px; }
    .footer-link { font-size: 0.72rem; padding: 13px 24px; }
    .footer-link i { font-size: 0.85rem; }
    .footer-bottom { font-size: 0.65rem; }
}

/* ==========================================================================
   FOOTER / CONTATTI
   ========================================================================== */
.site-footer {
    width: 100%;
    padding: 100px 40px 60px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-container {
    width: 100%;
    max-width: 700px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-tag { text-align: center; }

.footer-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 2.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 20px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.7;
    color: #a0aab0;
    max-width: 460px;
    margin-bottom: 50px;
}

.footer-links {
    display: flex;
    gap: 28px;
    margin-bottom: 60px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 30px;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.footer-link i { font-size: 1rem; color: #e88e29; transition: color 0.3s ease; }
.footer-link:hover {
    border-color: rgba(232,142,41,0.6);
    transform: translateY(-3px);
}
.footer-link:hover i { color: #fff; }

.footer-divider {
    width: 60px;
    height: 1px;
    background: rgba(232,142,41,0.4);
    margin-bottom: 24px;
}

.footer-bottom {
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
}

/* ==========================================================================
   PAGINA DI DETTAGLIO PROGETTO
   ========================================================================== */
.detail-section {
    width: 100%;
    padding: 100px 40px 40px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.detail-container { width: 100%; max-width: 1100px; }

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}
.detail-back:hover { color: #e88e29; }

.detail-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 6px auto 22px;
    text-align: center;
}

.detail-video-wrap {
    width: min(100%, 46vh * 16 / 9);
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    margin: 0 auto 32px;
}
.detail-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #a0aab0;
    max-width: 800px;
    margin-bottom: 44px;
}

@media (max-width: 768px) {
    .detail-section { padding: 130px 20px 70px; }
}

/* ==========================================================================
   SEZIONE PERSONAGGIO 3D (pagina dietro-le-quinte)
   ========================================================================== */
.character-section {
    width: 100%;
    padding: 10px 40px 60px;
}

.character-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 60px;
    align-items: start;
    max-width: 1450px;
    margin: 0 auto;
}

.skills-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    color: #fff;
    margin: 14px 0 22px;
    letter-spacing: 0.3px;
}

.skills-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.75;
    color: #a0aab0;
    max-width: 560px;
    margin-bottom: 40px;
}

.skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 46px;
}
.skills-list li { display: flex; gap: 1.5rem; align-items: flex-start; text-align: left; }

.skill-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(232,142,41,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e88e29;
    font-size: 1rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* le voci cliccabili (dietro le quinte, shortfilm, vr...) hanno solo un
   titolo su una riga: l'icona va centrata con lui, non allineata in alto */
.skills-list li.skill-item-clickable { align-items: center; }
.skill-item-clickable .skill-text h4 { margin-bottom: 0; }
.skills-list li:hover .skill-icon {
    transform: scale(1.15) rotate(-6deg);
    border-color: rgba(232,142,41,0.9);
    background: rgba(232,142,41,0.12);
}

/* animazione "pop" continua e discreta: fa capire che si può cliccare */
.skill-icon-pulse {
    animation: iconPulse 3s ease-in-out infinite;
}
.skills-list li:nth-child(1) .skill-icon-pulse { animation-delay: 0s; }
.skills-list li:nth-child(2) .skill-icon-pulse { animation-delay: 0.5s; }
.skills-list li:nth-child(3) .skill-icon-pulse { animation-delay: 1s; }
.skills-list li:nth-child(4) .skill-icon-pulse { animation-delay: 1.5s; }
.skills-list li:nth-child(5) .skill-icon-pulse { animation-delay: 2s; }
@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(232,142,41,0); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(232,142,41,0.45); }
}

.skill-item-clickable {
    cursor: pointer;
    padding: 6px 8px;
    margin: -6px -8px;
    border-radius: 8px;
    transition: background 0.25s ease;
}
.skill-item-clickable:hover {
    background: rgba(255,255,255,0.03);
}
.skill-item-clickable:hover .skill-icon-pulse {
    animation-play-state: paused;
    transform: scale(1.15) rotate(-6deg);
    border-color: rgba(232,142,41,0.9);
    background: rgba(232,142,41,0.12);
    box-shadow: 0 0 12px rgba(232,142,41,0.5);
}

.skill-arrow {
    font-size: 0.7rem;
    color: rgba(232,142,41,0.6);
    margin-left: 6px;
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.25s ease;
    display: inline-block;
}
.skill-item-clickable:hover .skill-arrow {
    transform: translateY(3px);
    opacity: 1;
}

.skill-text h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}
.skill-text p {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #a0aab0;
}

.tech-stack-label {
    font-family: 'Courier Prime', monospace;
    color: #e88e29;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin: 60px 0 16px;
}
/* nelle pagine con il personaggio 3D grande (dietro le quinte, shortfilm)
   lo stack tecnologico va spinto sotto la piega, fuori dalla prima
   schermata, per lasciare il personaggio protagonista senza scroll */
.skills-column .tech-stack-label { margin-top: 130px; }

.tech-stack { display: flex; gap: 14px; flex-wrap: wrap; }
/* centrato solo nelle pagine a colonna singola (Labo, City of Stars, Karma, Rino);
   nelle pagine a due colonne (Shortfilm, Dietro le quinte) resta a sinistra, un software per riga,
   allineato esattamente sotto "ruolo e responsabilità" */
.role-section .tech-stack { justify-content: center; max-width: 640px; margin: 0 auto; }
.skills-column .tech-stack { flex-direction: column; align-items: flex-start; gap: 22px; }
.skills-column .tech-stack .tech-chip { padding: 4px 0; }

.page-scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.25);
    font-size: 22px;
    z-index: 50;
    pointer-events: none;
    animation: pageScrollBounce 1.8s ease-in-out infinite;
    transition: opacity 0.4s ease;
}
.page-scroll-hint.is-hidden { opacity: 0; }
@keyframes pageScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(9px); }
}

.tech-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.78rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}
.tech-chip i { color: #e88e29; }
.tech-chip:hover { transform: translateY(-2px); }
/* Shortfilm / Dietro le quinte: niente micro-animazione al passaggio del mouse */
.skills-column .tech-chip:hover { transform: none; }

/* pulsante "ghost" — salta direttamente alla galleria immagini,
   per chi vuole solo la fruizione visiva senza leggere tutto il testo */
.jump-to-gallery {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 46px auto 46px;
    padding: 11px 24px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.jump-to-gallery i { transition: transform 0.3s ease; }
.jump-to-gallery:hover {
    color: #e88e29;
    border-color: #e88e29;
}
.jump-to-gallery:hover i { transform: translateY(3px); }

@media (max-width: 768px) {
    /* riduce il "buco" nero tra il bottone "salta alle immagini" e
       "ruolo e responsabilità" — solo su questa pagina (Labo) */
    .role-section.role-section-labo-top { margin-top: 4px; padding-top: 22px; }
    .detail-section-labo-hero { padding-bottom: 30px; }
}

/* --- visore Meta Quest 3 in 3D interattivo, pagina Labo ---
   ruota solo su drag (mouse o touch), niente autorotazione */
.quest3d-wrap {
    position: relative;
    width: 780px;
    height: 620px;
    margin: 46px auto 50px;
    cursor: grab;
    touch-action: none;
}
.quest3d-wrap:active { cursor: grabbing; }
#quest3dCanvas { width: 100%; height: 100%; display: block; }

.quest3d-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.4);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.quest3d-loading .spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(232,142,41,0.25);
    border-top-color: #e88e29;
    animation: spin 0.9s linear infinite;
}

.quest3d-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    text-align: center;
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

@media (max-width: 900px) {
    .quest3d-wrap { width: 480px; height: 400px; margin: 36px auto 44px; }
}
@media (max-width: 560px) {
    .quest3d-wrap { width: 340px; height: 300px; margin: 26px auto 34px; }
}

/* --- canvas 3D del personaggio --- */
.character-canvas-wrap {
    position: relative;
    height: min(936px, 76vh);
    aspect-ratio: 720 / 936;
    width: auto;
    margin: -160px auto 0;
    overflow: hidden;
}

#characterCanvas { width: 100%; height: 100%; display: block; }
.trail-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.character-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.4);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.character-loading .spinner {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(232,142,41,0.25);
    border-top-color: #e88e29;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.character-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-family: 'Courier Prime', monospace;
    color: rgba(255,255,255,0.5);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.hint-mobile { display: none; }

.scroll-down-hint { display: none; }

@media (max-width: 900px) {
    .character-grid { grid-template-columns: 1fr; gap: 50px; }
    .character-column { order: -1; position: relative; }
    .character-canvas-wrap { width: 270px; height: 432px; margin: -70px auto 0; touch-action: none; }
    .character-grid { margin-top: -60px; }
    .hint-desktop { display: none; }
    .hint-mobile { display: inline; }

    .scroll-down-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(232,142,41,0.6);
        font-size: 22px;
        pointer-events: none;
        animation: handSwipeDown 1.6s ease-in-out infinite;
    }
}
@keyframes handSwipeDown {
    0% { transform: translateY(-50%) translateY(-8px); opacity: 0.35; }
    50% { transform: translateY(-50%) translateY(8px); opacity: 1; }
    100% { transform: translateY(-50%) translateY(-8px); opacity: 0.35; }
}

/* ==========================================================================
   SEZIONI DEDICATE ALLE COMPETENZE
   ========================================================================== */
.skill-details-section {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 40px 60px;
}

.skill-detail-block {
    display: flex;
    flex-direction: column;
    gap: 100px;
    padding: 50px 0;
}
.skill-detail-block .skill-detail-text {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.skill-detail-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: #fff;
    margin: 14px 0 20px;
    letter-spacing: 0.3px;
}

/* freccetta accanto al titolo di ogni sezione con carosello: riporta
   in cima alla lista "ruolo e responsabilità", con un leggero rimbalzo
   che ne segnala la cliccabilità */
.back-to-roles {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: 8px;
    border-radius: 50%;
    border: 1px solid rgba(232,142,41,0.4);
    color: #e88e29;
    font-size: 0.85rem;
    text-decoration: none;
    vertical-align: middle;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    animation: backToRolesBounce 2.2s ease-in-out infinite;
}
.back-to-roles:hover {
    border-color: rgba(232,142,41,0.8);
    background: rgba(232,142,41,0.08);
    animation-play-state: paused;
    transform: translateY(-3px);
}
@keyframes backToRolesBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.skill-detail-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.8;
    color: #a0aab0;
    margin-bottom: 16px;
}
.skill-detail-desc:last-of-type { margin-bottom: 0; }

.skill-detail-media {
    aspect-ratio: 4 / 3;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255,255,255,0.15);
    background: radial-gradient(ellipse at 50% 40%, rgba(232,142,41,0.05), transparent 70%);
}
/* quando contiene un carosello di immagini vere, niente più cornice
   tratteggiata: ci pensa il carosello stesso a definire l'aspetto */
.skill-detail-media:has(.card-carousel),
.skill-detail-media.has-carousel {
    display: block;
    width: 100%;
    border: none;
    background: none;
    aspect-ratio: auto;
}
.skill-detail-media i { font-size: 2.6rem; }
.skill-detail-media span {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

.skill-detail-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.06);
}

@media (max-width: 900px) {
    .skill-details-section { padding: 50px 20px 30px; }
    .skill-detail-block {
        gap: 26px;
        padding: 34px 0;
        text-align: center;
    }
    .skill-detail-text { text-align: center; }
    .skill-detail-desc { margin: 0 auto; }
    .skill-detail-media { max-width: 100%; margin: 0 auto; }
}

/* ==========================================================================
   TESTO ESTESO DELLE SEZIONI DEDICATE
   ========================================================================== */
.skill-phase-label {
    display: block;
    font-family: 'Courier Prime', monospace;
    color: #e88e29;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 60px 0 22px;
}
.skill-detail-list { max-width: 900px; margin: 0 auto 24px; text-align: center; }
.skill-detail-list li { padding-left: 0; }
.skill-detail-list li::before { display: none; }
.skill-detail-note {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(160,170,176,0.75);
    max-width: 900px;
    margin: 26px auto 0;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.skill-detail-note strong { color: #cbd3d8; }

/* ==========================================================================
   CAROSELLO A CARTE (immagini della pipeline)
   ========================================================================== */
.card-carousel {
    position: relative;
    width: 100%;
    max-width: 860px;
    aspect-ratio: 16 / 9;
    margin: 20px auto 0;
}

.card-stack { position: absolute; inset: 0; }

.carousel-card {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 25px 60px rgba(0,0,0,0.55);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.75, 0.64, 1),
                opacity 0.4s ease,
                filter 0.4s ease;
}
.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.carousel-card img.is-loaded { opacity: 1; }

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(232,142,41,0.45);
    background: rgba(10,10,10,0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.carousel-arrow:hover { transform: translateY(-50%) scale(1.1); border-color: rgba(232,142,41,0.9); }
.carousel-prev { left: -18px; }
.carousel-next { right: -18px; }

@media (max-width: 900px) {
    .carousel-arrow {
        width: 32px;
        height: 32px;
        background: rgba(10,10,10,0.75);
        border-color: rgba(232,142,41,0.55);
    }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
}

.carousel-dots {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 20;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.carousel-dot.active { background: #e88e29; transform: scale(1.3); }

@media (max-width: 900px) {
    .card-carousel { max-width: 100%; margin: 0 auto 40px; }
}

/* ==========================================================================
   SEZIONE "RUOLO E RESPONSABILITÀ" — pagine di dettaglio progetto
   ========================================================================== */
.role-section {
    max-width: 900px;
    margin: 50px auto 0;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.role-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    color: #fff;
    margin: 10px 0 34px;
}
.role-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.8;
    color: #a0aab0;
    max-width: 700px;
    margin: 0 auto;
}

/* --- introduzione testuale al progetto, sotto al video (Shortfilm) --- */
.detail-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}
.detail-intro .detail-desc { text-align: left; }

/* ==========================================================================
   BOTTONE YOUTUBE — pagine di dettaglio progetto
   ========================================================================== */
.youtube-cta {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    margin: 36px auto 40px;
    padding: 14px 26px;
    background: rgba(255,0,0,0.08);
    border: 1px solid rgba(255,60,60,0.4);
    border-radius: 4px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.youtube-cta i { font-size: 1.3rem; color: #ff3b3b; }
.youtube-cta:hover {
    background: rgba(255,0,0,0.16);
    border-color: rgba(255,60,60,0.7);
    transform: translateY(-2px);
}
@media (max-width: 900px) {
    .youtube-cta { font-size: 0.78rem; padding: 12px 20px; }
}

/* ==========================================================================
   PERSONAGGIO 3D TOON — pagina Shortfilm
   ========================================================================== */
.character-canvas-wrap--sf {
    position: relative;
    height: min(650px, 62vh);
    aspect-ratio: 500 / 650;
    width: auto;
    margin: -25px auto 0;
    overflow: hidden;
    cursor: pointer;
    border-radius: 6px;
}
.character-canvas-wrap--sf canvas { width: 100%; height: 100%; display: block; }
.sf-flash-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.sf-punch-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: rgba(255,255,255,0.3);
    font-family: 'Courier Prime', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.4s ease;
}
.sf-punch-hint i { color: rgba(255,255,255,0.3); font-size: 0.85em; }
.sf-punch-hint.is-hidden { opacity: 0; }
@keyframes punchHintPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

@media (max-width: 900px) {
    .character-canvas-wrap--sf { width: 300px; height: 390px; margin: 0 auto 50px; touch-action: none; }
    .sf-punch-hint { font-size: 0.62rem; margin-top: 12px; }

    .character-column { position: relative; }
}

/* ==========================================================================
   SCENA "LA LANTERNA NELLA PIOGGIA" — pagina Karma
   ========================================================================== */
.karma-scene-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: radial-gradient(ellipse at 50% 60%, rgba(60,80,110,0.15), #0a0a0a 75%);
}
.karma-scene-wrap canvas { width: 100%; height: 100%; display: block; }
@media (max-width: 900px) {
    .karma-scene-wrap { max-width: 340px; }
}

/* ==========================================================================
   LIGHTBOX IMMAGINI — overlay a schermo intero per le foto dei caroselli
   ========================================================================== */
.img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 50px;
    touch-action: none;
    overflow: hidden;
}
.img-lightbox.is-open { opacity: 1; pointer-events: auto; }
.img-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    touch-action: none;
    will-change: transform;
}
.img-lightbox-close {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.img-lightbox-close:hover { background: rgba(255,255,255,0.15); border-color: rgba(232,142,41,0.6); }
@media (max-width: 600px) {
    .img-lightbox { padding: 14px; }
    .img-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 16px; }
}

/* le carte del carosello danno un'indicazione visiva di essere cliccabili */
.carousel-card { cursor: zoom-in; }

