/* Font Definitions */
@font-face {
    font-family: 'Gotham Black';
    src: url('fonts/Gotham-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: 'Gotham Bold';
    src: url('fonts/Gotham-Bold.otf') format('opentype'),
         url('fonts/GothamBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@font-face {
    font-family: 'Thomeo';
    src: url('fonts/thomeo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Gotham Bold', Arial, sans-serif;
    background-image: url('assets/sfondo-desktop.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    width: 1920px;
    max-width: 100%;
    margin: 0 auto;
    height: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Section: First Screen - Hero */
.header {
    text-align: center;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background-color: #f7c0ff;
}

.logo {
    max-width: 70%;
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0;
    filter: blur(20px);
    animation: logoAppear 2s ease-out forwards;
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        filter: blur(20px);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

.studios-title {
    font-family: 'Gotham Black', Arial, sans-serif;
    font-size: 36pt;
    color: #ff767d;
    margin-top: 30px;
    letter-spacing: 2px;
    opacity: 0;
}

.studios-title.letter-animate {
    opacity: 1;
}

.studios-title .letter {
    display: inline-block;
    opacity: 0;
    animation: letterAppear 0.3s ease-out forwards;
}

@keyframes letterAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tagline */
.tagline {
    text-align: center;
    margin-top: 50px;
    padding: 0 100px;
}

.tagline p {
    font-family: 'Gotham Bold', Arial, sans-serif;
    font-size: 20pt;
    color: #ff767d;
    line-height: 1.4;
}

/* Section: Second Screen - Services */
.main-title {
    text-align: center;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background-color: #f7c0ff;
}

.main-title h2 {
    font-family: 'Thomeo', serif;
    font-size: 80pt;
    color: #f7c0ff;
    letter-spacing: 1px;
}

/* Services Section */
.services {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    margin-top: 50px;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 50px;
    flex-shrink: 0;
    align-items: center;
    position: relative;
}

.services-left,
.services-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;

}

/* Desktop: services in grid layout */
@media screen and (min-width: 769px) {
    .services {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        align-items: start;
        max-width: 1000px;
                margin-left: 230px;

    }

    .services-left,
    .services-right {
        display: contents;
    }
}

/* Accordion Styles */
.accordion-item {
    margin: 0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.accordion-title {
    font-family: 'Gotham Bold', Arial, sans-serif;
    font-size: 22pt;
    color: #f7c0ff;
    margin: 5px 0;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.accordion-title:hover {
    color: #ff767d;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content p {
    font-family: 'Gotham Bold', Arial, sans-serif;
    font-size: 13pt;
    font-weight: 300;
    color: #f7c0ff;
    margin: 10px 0;
    padding: 0 20px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    margin-top: 10px;
}

/* Allineamento personalizzato per gli accordion - DESKTOP */
@media screen and (min-width: 769px) {
    /* Font size per titoli accordion su desktop */
    .accordion-title {
        font-size: 27pt;
    }

    /* RIGA 1: FORMAT (colonna 1) + ADMINISTRATION (colonna 2) */

    /* FORMAT - grid row 1, column 1 */
    .services-left .accordion-item:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        transform: translateX(0px);
    }

    .services-left .accordion-item:nth-child(1) .accordion-title {
        text-align: center;
    }

    .services-left .accordion-item:nth-child(1) .accordion-content {
        text-align: center;
    }

    /* ADMINISTRATION - grid row 1, column 2 */
    .services-right .accordion-item:nth-child(1) {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        transform: translateX(0px);
    }

    .services-right .accordion-item:nth-child(1) .accordion-title {
        text-align: center;
    }

    .services-right .accordion-item:nth-child(1) .accordion-content {
        text-align: center;
    }

    /* RIGA 2: SUPERVISING (colonna 1) + DRINK STRATEGY (colonna 2) */

    /* SUPERVISING - grid row 2, column 1 */
    .services-left .accordion-item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        transform: translateX(136px);
    }

    .services-left .accordion-item:nth-child(2) .accordion-title {
        text-align: center;
    }

    .services-left .accordion-item:nth-child(2) .accordion-content {
        text-align: center;
    }

    /* DRINK STRATEGY - grid row 2, column 2 */
    .services-right .accordion-item:nth-child(2) {
        grid-column: 2;
        grid-row: 2;
        justify-self: center;
        transform: translateX(183px);
    }

    .services-right .accordion-item:nth-child(2) .accordion-title {
        text-align: center;
    }

    .services-right .accordion-item:nth-child(2) .accordion-content {
        text-align: center;
    }

    /* RIGA 3: SVILUPPO PRODOTTI (span 2 colonne, centrato) */

    /* SVILUPPO PRODOTTI - grid row 3, span both columns */
    .services-left .accordion-item:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: center;
        transform: translateX(122px);
    }

    .services-left .accordion-item:nth-child(3) .accordion-title {
        text-align: center;
    }

    .services-left .accordion-item:nth-child(3) .accordion-content {
        text-align: center;
    }

    /* RIGA 4: FORMAZIONE (colonna 1) + S.O.P. (colonna 2) */

    /* FORMAZIONE - grid row 4, column 1 */
    .services-left .accordion-item:nth-child(4) {
        grid-column: 1;
        grid-row: 4;
        justify-self: center;
        transform: translateX(183px);
    }

    .services-left .accordion-item:nth-child(4) .accordion-title {
        text-align: center;
    }

    .services-left .accordion-item:nth-child(4) .accordion-content {
        text-align: center;
    }

    /* S.O.P. - grid row 4, column 2 */
    .services-right .accordion-item:nth-child(3) {
        grid-column: 2;
        grid-row: 4;
        justify-self: center;
        transform: translateX(87px);
    }

    .services-right .accordion-item:nth-child(3) .accordion-title {
        text-align: center;
    }

    .services-right .accordion-item:nth-child(3) .accordion-content {
        text-align: center;
    }

    /* RIGA 5: LAB BUILDING (span 2 colonne, centrato) */

    /* LAB BUILDING - grid row 5, span both columns */
    .services-left .accordion-item:nth-child(5) {
        grid-column: 1 / -1;
        grid-row: 5;
        justify-self: center;
        transform: translateX(19px);
    }

    .services-left .accordion-item:nth-child(5) .accordion-title {
        text-align: center;
    }

    .services-left .accordion-item:nth-child(5) .accordion-content {
        text-align: center;
    }

    /* RIGA 6: FINANCE (span 2 colonne, centrato) */

    /* FINANCE - grid row 6, span both columns */
    .services-right .accordion-item:nth-child(4) {
        grid-column: 1 / -1;
        grid-row: 6;
        justify-self: center;
        transform: translateX(226px);
    }

    .services-right .accordion-item:nth-child(4) .accordion-title {
        text-align: center;
    }

    .services-right .accordion-item:nth-child(4) .accordion-content {
        text-align: center;
    }
}

/* Favicon Section */
.favicon-section {
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding-bottom: 50px;
    min-height: 150px;
    padding-top: 80px;
    position: relative;
    margin-top: 60px;
}

.favicon-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background-color: #f7c0ff;
}

.favicon-accordion {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.favicon-large {
    width: 180px;
    height: auto;
    transition: transform 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.favicon-large.reveal {
    animation: faviconReveal 2s ease-out forwards;
}

@keyframes faviconReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(8px) contrast(1.5) brightness(1.2);
        image-rendering: pixelated;
        -ms-interpolation-mode: nearest-neighbor;
    }
    30% {
        opacity: 0.3;
        filter: blur(6px) contrast(1.4) brightness(1.15);
    }
    50% {
        opacity: 0.6;
        transform: translateY(15px);
        filter: blur(4px) contrast(1.3) brightness(1.1);
    }
    70% {
        opacity: 0.8;
        filter: blur(2px) contrast(1.15) brightness(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0) contrast(1) brightness(1);
        image-rendering: auto;
    }
}

.favicon-accordion:hover .favicon-large {
    transform: scale(1.05);
}

.favicon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.favicon-content p {
    font-family: 'Gotham Bold', Arial, sans-serif;
    font-size: 13pt;
    font-weight: 300;
    color: #f7c0ff;
    margin: 10px 0;
    padding: 0 20px;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.favicon-accordion.active .favicon-content {
    max-height: 500px;
    margin-top: 30px;
}

/* Section: Third Screen - Partners */
.partners-title {
    text-align: center;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
    position: relative;
}

.partners-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background-color: #f7c0ff;
}

.partners-title h2 {
    font-family: 'Thomeo', serif;
    font-size: 60pt;
    color: #f7c0ff;
}

/* Partners Logos */
.partners-logos-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 80px auto 0;
    overflow: hidden;
    position: relative;
}

.partners-logos {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: scroll-left 20s linear infinite;
    width: max-content;
}

.partners-logos img {
    height: 55px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Section: Fourth Screen - Contact */
.contact-title {
    text-align: center;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.contact-title h2 {
    font-family: 'Thomeo', serif;
    font-size: 60pt;
    color: #f7c0ff;
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    padding: 0 200px;
    width: 100%;
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-content p {
    font-family: 'Gotham Bold', Arial, sans-serif;
    font-size: 14pt;
    color: #f7c0ff;
    margin: 5px 0;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media screen and (max-width: 1920px) {
    body {
        background-size: 100% auto;
    }

    .container {
        width: 100%;
        height: auto;
        min-height: 100vh;
    }
}

@media screen and (max-width: 1200px) {
    .studios-title {
        font-size: 36pt;
    }

    .tagline p {
        font-size: 20pt;
        padding: 0 50px;
    }

    .main-title h2,
    .partners-title h2,
    .contact-title h2 {
        font-size: 50pt;
    }

    .services {
        gap: 80px;
        padding: 0 50px;
    }

    .accordion-title {
        font-size: 24pt;
    }

    .accordion-content p {
        font-size: 14pt;
    }

    .footer {
        padding: 0 50px 60px 50px;
    }

    .footer-content p {
        font-size: 18pt;
    }
}

@media screen and (max-width: 768px) {
    html {
        height: 100%;
        overflow: hidden;
    }

    body {
        height: 100%;
        background-image: url('assets/sfondo.png');
        background-size: cover;
        background-position: center center;
        background-attachment: fixed;
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    /* iOS background fix */
    @supports (-webkit-touch-callout: none) {
        body {
            background-attachment: fixed;
            background-size: cover;
        }
    }

    .container {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    .header {
        padding-top: 40px;
        padding-bottom: 30px;
        min-height: 100vh;
    }

    .header::after {
        width: 80%;
        bottom: 10px;
    }

    .logo {
        max-width: 80%;
    }

    .studios-title {
        font-size: 24pt;
    }

    .tagline {
        margin-top: 40px;
        padding: 0 20px;
    }

    .tagline p {
        font-size: 14pt;
        line-height: 1.5;
    }

    .main-title {
        margin-top: 30px;
        min-height: auto;
        padding-top: 20px;
        padding-bottom: 30px;
    }

    .main-title::after {
        width: 80%;
        bottom: 10px;
    }

    .main-title h2 {
        font-size: 32pt;
        margin: 0;
        padding: 0;
    }

    .partners-title h2,
    .contact-title h2 {
        font-size: 32pt;
        margin: 0;
        padding: 0;
    }

    .services {
        flex-direction: column;
        gap: 0;
        margin-top: 20px;
        padding: 0 20px;
        align-items: center;
        width: 100%;
    }

    .services-left,
    .services-right {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .services-left,
    .services-right {
        align-items: stretch;
    }

    .accordion-item {
        display: flex;
        flex-direction: column;
        margin: 8px 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }

    .accordion-title {
        font-size: 16pt;
        margin: 10px 0;
        width: 100%;
    }

    /* Allineamento alternato sinistra/destra per gli accordion */
    /* FORMAT - a sinistra */
    .services-left .accordion-item:nth-child(1) {
        text-align: left;
    }

    .services-left .accordion-item:nth-child(1) .accordion-title {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .services-left .accordion-item:nth-child(1) .accordion-content {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    /* SVILUPPO PRODOTTI - a destra */
    .services-left .accordion-item:nth-child(2) {
        text-align: right;
    }

    .services-left .accordion-item:nth-child(2) .accordion-title {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    .services-left .accordion-item:nth-child(2) .accordion-content {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    /* LAB BUILDING - a sinistra */
    .services-left .accordion-item:nth-child(3) {
        text-align: left;
    }

    .services-left .accordion-item:nth-child(3) .accordion-title {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .services-left .accordion-item:nth-child(3) .accordion-content {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    /* DRINK STRATEGY - a destra */
    .services-left .accordion-item:nth-child(4) {
        text-align: right;
    }

    .services-left .accordion-item:nth-child(4) .accordion-title {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    .services-left .accordion-item:nth-child(4) .accordion-content {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    /* S.O.P. - a sinistra */
    .services-left .accordion-item:nth-child(5) {
        text-align: left;
    }

    .services-left .accordion-item:nth-child(5) .accordion-title {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .services-left .accordion-item:nth-child(5) .accordion-content {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    /* SUPERVISING - a destra */
    .services-right .accordion-item:nth-child(1) {
        text-align: right;
    }

    .services-right .accordion-item:nth-child(1) .accordion-title {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    .services-right .accordion-item:nth-child(1) .accordion-content {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    /* FORMAZIONE - a sinistra */
    .services-right .accordion-item:nth-child(2) {
        text-align: left;
    }

    .services-right .accordion-item:nth-child(2) .accordion-title {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .services-right .accordion-item:nth-child(2) .accordion-content {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    /* FINANCE - a destra */
    .services-right .accordion-item:nth-child(3) {
        text-align: right;
    }

    .services-right .accordion-item:nth-child(3) .accordion-title {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    .services-right .accordion-item:nth-child(3) .accordion-content {
        text-align: right;
        padding-left: 40px;
        padding-right: 0;
    }

    /* ADMINISTRATION - a sinistra */
    .services-right .accordion-item:nth-child(4) {
        text-align: left;
    }

    .services-right .accordion-item:nth-child(4) .accordion-title {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .services-right .accordion-item:nth-child(4) .accordion-content {
        text-align: left;
        padding-left: 0;
        padding-right: 40px;
    }

    .accordion-content p {
        font-size: 11pt;
        padding: 0 10px;
        line-height: 1.5;
    }

    .accordion-item.active .accordion-content {
        max-height: 600px;
        margin-top: 10px;
    }

    .favicon-section {
        margin-top: 40px;
        padding-top: 40px;
        padding-bottom: 40px;
        min-height: auto;
        flex-shrink: 0;
    }

    .favicon-large {
        width: 120px;
    }

    .favicon-large.reveal {
        animation-duration: 1.8s;
    }

    /* Landscape mobile adjustments */
    @media screen and (max-height: 500px) and (orientation: landscape) {
        .favicon-section {
            margin-top: 60px;
            padding-top: 40px;
        }
    }

    .partners-title,
    .contact-title {
        margin-top: 40px;
        padding-top: 20px;
        padding-bottom: 30px;
    }

    .partners-title::after {
        width: 80%;
        bottom: 10px;
    }

    .partners-logos-wrapper {
        margin-top: 20px;
        max-width: 100%;
        padding: 0;
    }

    .partners-logos {
        gap: 40px;
        animation: scroll-left-mobile 15s linear infinite;
    }

    .partners-logos img {
        height: 50px;
    }

    @keyframes scroll-left-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .footer {
        margin-top: 40px;
        margin-bottom: 80px;
        padding: 0 20px 40px 20px;
    }

    .footer-content {
        gap: 8px;
    }

    .footer-content p {
        font-size: 12pt;
        margin: 8px 0;
    }
}

@media screen and (max-width: 480px) {
    .studios-title {
        font-size: 20pt;
    }

    .tagline p {
        font-size: 12pt;
    }

    .main-title h2,
    .partners-title h2,
    .contact-title h2 {
        font-size: 28pt;
    }

    .accordion-title {
        font-size: 14pt;
    }

    .accordion-content p {
        font-size: 10pt;
    }

    .footer-content p {
        font-size: 10pt;
    }

    .partners-logos {
        gap: 30px;
    }

    .partners-logos img {
        height: 35px;
    }

    .partners-logos-wrapper {
        padding: 0;
    }
}