/* --- RESET E BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.04em;
}

body {
    overflow-x: hidden;
    background-color: #ffffff;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(20px, 1vw, 60px) clamp(25px, 1.5vw, 90px);
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.logo {
    height: clamp(50px, 2.5vw, 60px);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li { margin-left: 1.5vw; }

.nav-links a {
    text-decoration: none;
    color: #000000;
    font-weight: bold;
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-size: clamp(14px, 0.75vw, 18px);
    transition: color 0.3s ease;
}

.nav-links a span {
    display: inline-block;
    color: #000000;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s;
}

.nav-links a.visible span {
    transform: translateY(0);
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0px;
    left: 0;
    background-color: #000000;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.navbar.is-dark-bg .nav-links a,
.navbar.is-dark-bg .nav-links a span {
    color: #ffffff;
}
.navbar.is-dark-bg .nav-links a::after {
    background-color: #ffffff;
}

/* --- HERO VIDEO --- */
.hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #000;
}

.video-parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.parallax-target {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.video-bg {
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

/* --- CHI SIAMO --- */
#chi-siamo-wrapper {
    position: relative;
    min-height: 100vh;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(25px, 7vw, 180px);
}

.sticky-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intro-text h2 {
    font-size: clamp(42px, 2.5vw, 56px);
    font-weight: 200;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1vw;
}

.intro-text p, .intro-text li {
    font-size: clamp(14px, 0.75vw, 18px);
    line-height: 2;
}

.intro-text ul {
    list-style-position: inside;
    margin-left: 2vw;
}

.word-box {
    position: relative;
    display: inline-block;
    height: 1.2em;
    width: 450px;
    overflow: hidden;
    vertical-align: middle;
}

.word {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s;
    font-weight: 400;
}

.word.active {
    opacity: 1;
    transform: translateY(0);
}

.word.passed {
    opacity: 0;
    transform: translateY(100%);
}

/* --- SEZIONE SPEAKER --- */
#intro-wrapper {
    min-height: 100vh;
    height: auto;
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(25px, 7vw, 180px);
}

.intro-speakers {
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: clamp(42px, 2.5vw, 56px);
    font-weight: 200;
    position: relative;
    z-index: 10;
}

.reveal-char {
    color: #000;
    opacity: 0.15;
    transition: opacity 2s ease;
}

.reveal-char.active {
    opacity: 1;
}

.speaker-section {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.speaker-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.speaker-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.speaker-content {
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.speaker-link {
    text-decoration: none;
    color: #fff;
    font-size: clamp(42px, 2.5vw, 56px);
    font-weight: 400;
    position: relative;
    display: inline-block;
    pointer-events: auto;
    padding: 0px 25px;
}

.speaker-link span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s;
}

.speaker-section.is-visible .speaker-link span {
    transform: translateY(0);
    opacity: 1;
}

.speaker-link::after {
    content: '';
    position: absolute;
    height: 2px;
    bottom: 4px;
    left: 25px;
    right: 25px;
    background-color: #fff;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.speaker-link:hover::after { 
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- LIST VIEW OVERLAY --- */
.list-btn {
    position: fixed;
    bottom: clamp(20px, 1vw, 60px);
    left: clamp(30px, 1.5vw, 90px);
    z-index: 2000;
    padding: 12px 20px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: clamp(14px, 0.75vw, 18px);
    opacity: 0;
    transform: translateY(1vw);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.list-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.list-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    clip-path: circle(0% at 5vw 94%);
    transition: clip-path 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

.list-overlay.active {
    clip-path: circle(150% at 5vw 94%);
}

.list-container {
    width: 80%;
    max-height: 85vh;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
}

.speaker-list-simple {
    list-style: none;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
    width: 100%;
}

.speaker-list-simple li { margin: 0; }

.speaker-list-simple a {
    text-decoration: none;
    color: #000;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
    font-size: clamp(14px, 0.75vw, 18px);
    text-transform: uppercase;
    display: inline-block;
}

.speaker-list-simple a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0px;
    left: 0;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.speaker-list-simple a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- GALLERY --- */
.gallery-section {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    overflow-x: hidden;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.gallery-section:active {
    cursor: grabbing;
}

.gallery-track {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
    width: max-content;
    padding: 0 2vw;
}

.gallery-row {
    display: flex;
    gap: 0.5vw;
    width: max-content;
}

.gallery-img {
    height: 24vh;
    width: auto;
    object-fit: cover;
    border-radius: 0.5vw;
    filter: saturate(0.6);
    opacity: 0.8;
    transition: opacity 0.4s ease;
    -webkit-user-drag: none;
    pointer-events: auto;
    will-change: transform;
}

.gallery-img:hover {
    opacity: 1;
}

/* --- CONTATTI --- */
.contact-section {
    width: 100%;
    min-height: 100vh;
    height: auto;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    padding: clamp(25px, 7vw, 180px);
    position: relative;
}

.contact-container {
    display: grid;
    grid-template-columns: clamp(550px, 32vw, 700px) 1fr;
    width: 100%;
    align-items: center; 
    gap: 3vw;
}

.contact-title {
    font-size: clamp(42px, 2.5vw, 56px);
    font-weight: 200;
    color: #000;
}

.contact-right {
    display: flex;
    flex-direction: column;
}

.contact-item {
    padding: clamp(30px, 2vw, 60px) 0;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transform: translateY(2vw);
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
}

.contact-item:last-child {
    border-bottom: 1px solid #e0e0e0;
}

.contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-item:nth-child(2) { transition-delay: 0.3s; }
.contact-item:nth-child(3) { transition-delay: 0.5s; }

.contact-role {
    font-size: clamp(11px, 0.65vw, 15px);
    text-transform: uppercase;
    color: #888;
    margin-bottom: 5px;
}

.contact-name {
    font-size: clamp(18px, 0.9vw, 22px);
    font-weight: 400;
    margin-bottom: 5px;
}

.contact-link {
    font-size: clamp(14px, 0.75vw, 18px);
    color: #000;
    text-decoration: none;
    transition: opacity 0.3s ease;
    width: fit-content;
}

.contact-link:hover { opacity: 0.6; }

.site-footer {
    position: absolute;
    bottom: clamp(20px, 1vw, 60px);
    left: clamp(25px, 1.5vw, 90px);
    right: clamp(25px, 1.5vw, 90px);
    font-size: clamp(11px, 0.65vw, 15px);
    color: #888;
    text-transform: uppercase;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* --- PRESENTATION PAGE --- */
.presentation-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    background-color: #fff;
}

.presentation-image-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 35vw;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.speaker-img-v {
    height: 100%;
    width: 100%;
    display: block;
    object-fit: cover;
}

.presentation-details {
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(25px, 7vw, 180px);
    background-color: #fff;
}

.details-content h1 {
    font-size: clamp(42px, 2.5vw, 56px);
    font-weight: 200;
    margin-bottom: 1.5vw;
}

.biography {
    font-size: clamp(14px, 0.75vw, 18px);
    line-height: 2;
    color: #333;
    margin-bottom: 2vw;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    font-size: clamp(14px, 0.75vw, 18px);
    padding-bottom: 5px;
    transition: opacity 0.3s;
    margin-top: 2vw;
}

.back-link:hover { opacity: 0.6; }

.reveal-text {
    opacity: 0;
    transform: translateY(1.5vw);
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
    display: block;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.details-content h1.reveal-text { transition-delay: 0.2s; }
.details-content .biography.reveal-text { transition-delay: 0.4s; }
.details-content .back-link.reveal-text { transition-delay: 0.6s; }

/* --- RESPONSIVE MEDIA QUERIES --- */
.menu-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .contact-section { justify-content: flex-start; }
    .contact-container { grid-template-columns: 1fr; gap: 7vw; }
    .contact-item { padding: clamp(30px, 2vw, 60px) 0; }
    .contact-section { padding-bottom: 120px; }
    .word-box { width: 300px; }
    
    .presentation-container { flex-direction: column; display: block; }
    .presentation-image-wrapper { position: relative; width: 100%; height: 60vh; }
    .speaker-img-v { object-position: 50% 25%; }
    .presentation-details { width: 100%; min-height: auto; padding: clamp(25px, 7vw, 180px); justify-content: flex-start; }
    .details-content h1 { margin-bottom: 20px; }
    .biography { margin-bottom: 30px; }
    .back-link { margin-top: 10px; }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        cursor: pointer;
        z-index: 2100;
    }
    
    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #000000;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    }

    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        transition: right 0.6s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 2050;
        padding: 0;
    }

    .nav-links.active { right: 0; }
    .nav-links li { margin-left: 0; }
    .nav-links a { font-size: clamp(42px, 2.5vw, 56px); font-weight: 400; }
    .nav-links a::after { height: 2px; }

    .navbar.is-dark-bg .menu-toggle span { background-color: #ffffff; }
    .navbar.is-dark-bg .menu-toggle.active span { background-color: #000000 !important; }
    .navbar.is-dark-bg .nav-links.active a,
    .navbar.is-dark-bg .nav-links.active a span { color: #000000 !important; }
    .navbar.is-dark-bg .nav-links.active a::after { background-color: #000000 !important; }

    .intro-speakers { padding-top: 60px; }
    .list-container { justify-content: flex-start; }
    .speaker-list-simple { grid-template-columns: 1fr; gap: 20px; }
    .speaker-list-simple a { font-size: 18px; }
}
