
@font-face {
    font-family: 'Square Sans Serif 7';
    src: url('Fonts/square_sans_serif_7.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-primary: 'IBM Plex Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Squared display face for headlines/logo. Previous choice was the serif
       'Fraunces' (softer, editorial) — swap back here if we revert. */
    --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
    /* Font per "Simone Rusconi" nel menu e nei titoli hero. Per tornare al
       font precedente basta rimettere var(--font-display) al posto di
       var(--font-name) in .logo-main e .hero-content h1 qui sotto. */
    --font-name: 'Square Sans Serif 7', 'Helvetica Neue', Arial, sans-serif;

    /* Canvas: neutral off-white, with pure-white cards standing out on top of it */
    --color-background: #f5f5f4;
    --color-background-alt: #ffffff;
    --color-background-elevated: #ffffff;

    /* Ink: near-black for headlines, muted grey for body copy */
    --color-text: #17181c;
    --color-text-dim: #5c5d63;
    --color-border: rgba(20, 20, 22, 0.08);
    --color-border-strong: rgba(20, 20, 22, 0.16);
    --color-scrollbar-thumb: rgba(20, 20, 22, 0.22);

    /* Neutral dark-grey accent (used on light backgrounds); white is used instead
       wherever the element already sits on a dark surface (e.g. footer) */
    --color-accent: #2b2c31;
    --color-accent-on-dark: #ffffff;

    /* Hero sits on a dark video regardless of page theme: always light */
    --color-on-video: #ffffff;
    --color-on-video-dim: rgba(255, 255, 255, 0.75);
    --color-on-video-border: rgba(255, 255, 255, 0.3);

    --color-navbar-bg: rgba(255, 255, 255, 0.72);
    --color-navbar-bg-scrolled: rgba(255, 255, 255, 0.92);

    /* Footer: dark grey bookend */
    --color-footer-bg: #1c1d20;
    --color-footer-text: #f4f2ee;
    --color-footer-text-dim: #9a9a9e;

    --header-height: 84px;
    --container-max: 1400px;
    --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
    --transition: 0.5s var(--ease);
    --radius: 4px;
}

/* Reset & base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    overflow-x: hidden;
    font-weight: 300;
    padding-top: var(--header-height);
}

body.home-page {
    padding-top: 0;
}

img, video, iframe {
    max-width: 100%;
}

::selection {
    background: var(--color-accent);
    color: #fff;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-navbar-bg);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--color-border);
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.main-header.is-scrolled {
    background: var(--color-navbar-bg-scrolled);
    box-shadow: 0 10px 30px rgba(18, 24, 43, 0.12);
}

/* Transparent header over the hero video — reverts to the normal dark-ink
   colors as soon as the full-screen mobile menu opens, since that overlay
   is light and white text on it would be unreadable */
body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #ffffff;
}

body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .logo a,
body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .main-nav a,
body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .hamburger-menu {
    color: #ffffff;
}

body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .logo-sub {
    color: rgba(255, 255, 255, 0.75);
}

body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .main-nav a::after {
    background-color: #ffffff;
}

body.home-page .main-header:not(.is-scrolled):not(:has(.main-nav.mobile-active)) .lang-switch {
    border-color: rgba(255, 255, 255, 0.4);
}

.logo {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.logo a {
    text-decoration: none;
    color: var(--color-text);
    text-align: left;
    display: block;
    line-height: 1.2;
}

.logo-main {
    display: block;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.logo-sub {
    display: block;
    font-size: 0.72rem;
    white-space: nowrap;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.15rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    position: relative;
    padding-bottom: 6px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-accent);
    transition: width 0.35s var(--ease);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.lang-switch {
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    padding: 0.35rem 0.9rem !important;
}

.lang-switch::after {
    display: none;
}

.lang-switch:hover {
    border-color: var(--color-accent);
}

/* Hamburger */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text);
    z-index: 1001;
}

/* Hero */
.hero {
    position: relative;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    /* Griglia a 3 righe elastiche (sopra al blocco titolo+CTA, tra il
       blocco e "scorri", sotto "scorri"): la riga sopra il titolo e' un
       po' piu' ampia (piu' respiro dal menu), le due attorno a "scorri"
       restano UGUALI tra loro cosi' resta centrato rispetto al blocco
       sopra. Nessun calcolo JS. */
    display: grid;
    grid-template-rows: 1.6fr auto 1fr auto 1fr;
    justify-items: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-body {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}


body.home-page .hero {
    height: 100vh;
    height: 100dvh;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 11, 12, 0.65) 0%, rgba(11, 11, 12, 0.15) 28%, rgba(11, 11, 12, 0.25) 60%, rgba(11, 11, 12, 0.8) 100%);
    z-index: 0;
    pointer-events: none;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-content {
    color: var(--color-on-video);
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin: 0;
}

.hero-content p {
    font-family: var(--font-primary);
    font-size: 1rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    font-weight: 300;
    color: var(--color-on-video-dim);
    margin: 0.75rem 0 0;
}

.hero-content::after {
    content: '';
    display: block;
    width: 56px;
    height: 2px;
    background: var(--color-on-video);
    margin: 1.75rem auto 0;
}

/* Hero CTA Buttons */
.hero-cta-container {
    position: relative;
    margin-top: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    align-items: stretch;
}

.hero-cta-button {
    position: relative;
    flex: 0 1 380px;
    padding: 1.75rem 2rem;
    text-align: center;
    color: var(--color-on-video);
    text-decoration: none;
    border: 1px solid var(--color-on-video-border);
    border-radius: var(--radius);
    background: rgba(11, 11, 12, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.hero-cta-button:hover {
    border-color: var(--color-on-video);
    background: rgba(11, 11, 12, 0.55);
    transform: translateY(-4px);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.hero-cta-button h3 {
    margin: 0 0 0.4rem 0;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero-cta-button span {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-on-video-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-cta-button span::after {
    content: '\2192';
    transition: transform 0.35s var(--ease);
}

.hero-cta-button:hover span::after {
    transform: translateX(6px);
}

.hero-scroll-cue {
    /* Riga propria nella griglia della hero (non più posizionato via JS):
       la spaziatura sopra/sotto la gestisce interamente .hero via
       grid-template-rows, corretto fin dal primo render senza dover
       attendere font o misure JS. margin-top la abbassa di circa 1cm
       rispetto al centro naturale della griglia. */
    grid-row: 4;
    margin-top: 1cm;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-on-video-dim);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
    /* Appare via animazione CSS pura (non GSAP): compare subito dopo che i
       bottoni CTA hanno finito di comparire in sequenza, ma essendo CSS
       nativo va sempre a buon fine da sola, anche se gli script (GSAP,
       rete lenta) non partono o non completano mai. */
    opacity: 0;
    animation: heroCueFadeIn 0.8s var(--ease) 1.3s forwards;
}

@keyframes heroCueFadeIn {
    from { opacity: 0; }
    to { opacity: 0.85; }
}

.hero-scroll-cue i {
    animation: scrollCueBounce 2.2s var(--ease) infinite;
}

@keyframes scrollCueBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Buttons shared visual language */
.equipment-button,
.contact-form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    background: transparent;
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: left center;
    color: var(--color-text);
    padding: 0.9rem 1.9rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    cursor: pointer;
    transition: background-size 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.equipment-button:hover,
.contact-form-button:hover {
    background-size: 100% 100%;
    border-color: var(--color-accent);
    color: #fff;
}

.equipment-button i {
    font-size: 1rem;
}

/* Work Section */
.work-section {
    background-color: var(--color-background);
}

.work-title-bar {
    background-color: var(--color-background);
    color: var(--color-text);
    text-align: center;
    padding: 4.5rem 2rem 3rem;
}

.work-title-bar h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.01em;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 1.1rem;
}

.work-title-bar h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 2px;
    background: var(--color-accent);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    counter-reset: work-index;
    background: var(--color-border);
}

.work-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--color-background-alt);
    aspect-ratio: 4 / 3;
    counter-increment: work-index;
}

.work-item a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.work-item::before {
    content: counter(work-index, decimal-leading-zero);
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--color-on-video);
    background: rgba(11, 11, 12, 0.55);
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--color-on-video-border);
    border-radius: 999px;
    letter-spacing: 0.05em;
    backdrop-filter: blur(6px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.work-item:hover::before,
.work-item:focus-within::before {
    opacity: 1;
    transform: translateY(0);
}

.work-item .work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 12, 0) 42%, rgba(11, 11, 12, 0.88) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    text-align: left;
    padding: 1.6rem;
    color: var(--color-on-video);
    transition: background var(--transition);
}

.work-item:hover .work-overlay {
    background: linear-gradient(180deg, rgba(11, 11, 12, 0.1) 15%, rgba(11, 11, 12, 0.94) 100%);
}

.work-overlay h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 500;
    margin: 0 0 0.4rem 0;
    transform: translateY(10px);
    transition: transform var(--transition);
}

.work-item:hover .work-overlay h3 {
    transform: translateY(0);
}

.work-overlay p {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-on-video-dim);
    margin: 0;
    position: relative;
    padding-top: 0.7rem;
}

.work-overlay p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 2px;
    background: var(--color-on-video);
    transition: width var(--transition);
}

.work-item:hover .work-overlay p::before {
    width: 46px;
}

.work-item .work-image {
    transition: transform 1.2s var(--ease);
}

.work-item:hover .work-image {
    transform: scale(1.06);
}

/* Single Work Page */
.single-work-section {
    padding: 4rem 2rem 0;
    background-color: var(--color-background);
    color: var(--color-text);
}

.single-work-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.single-work-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.single-work-content h2 {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    color: var(--color-text-dim);
}

.work-details-container {
    background-color: var(--color-background);
    padding: 3rem 0;
}

.work-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 2rem;
    position: relative;
}

.category-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-title {
    text-align: center;
    display: block;
}

.category-content {
    display: block;
    text-align: left;
    width: 100%;
    max-width: 200px;
    margin-top: 0.3rem;
}

.role-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.year-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.category-item .detail-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-item .category-title {
    text-align: center;
    display: inline-block;
}

.category-item .category-content {
    display: block;
    margin-top: 0.3rem;
    text-align: left;
    width: 100%;
    max-width: 200px;
}

@media (max-width: 768px) {
    .category-item {
        align-items: center;
    }

    .category-content {
        text-align: center;
        max-width: 100%;
    }
}

.detail-item {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.detail-item i {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--color-accent);
}

.detail-text {
    text-align: left;
}

.detail-text strong {
    font-weight: 600;
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-dim);
    margin-bottom: 0.4rem;
}

.detail-text span {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: normal;
    color: var(--color-text);
}

.full-width-container {
    width: 100%;
    padding: 0;
    background: var(--color-background);
}

.full-width-container + .full-width-container {
    margin-top: 3rem;
}

.video-container {
    position: relative;
    height: 0;
    overflow: hidden;
    background: var(--color-background-alt);
    margin: 3rem auto;
    padding-bottom: 56.25%;
    max-width: 1800px;
    width: 92%;
    border-radius: 8px;
}

.single-work-page {
    background: var(--color-background);
}

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

.work-description {
    width: 100%;
    background: var(--color-background);
    color: var(--color-text);
    padding: 3rem 0;
}

.work-description-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text-dim);
}

/* Reviews Section */
.reviews-section {
    padding: 3rem 2rem 5rem;
    background-color: var(--color-background);
    /* .single-work-page overrides padding-top below to match this
       section's own bottom padding on the lavoro-* pages */
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Lavoro pages: the review sits between the description and the footer,
   so its own top/bottom padding should match exactly */
.single-work-page .reviews-section {
    padding-top: 5rem;
}

.review-item {
    flex: 1 1 420px;
    max-width: 520px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 1s ease-out;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-left: 2px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 2rem;
}

.review-right {
    margin-top: 0;
}

.review-item.is-visible {
    opacity: 1;
}

.review-item.is-visible.review-right {
    transition-delay: 0.4s;
}

.review-content {
    text-align: left;
    position: relative;
}

.review-content blockquote {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    margin: 0 0 1.1rem 0;
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--color-text);
}

.review-content cite {
    font-style: normal;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
}

/* About Section */
.about-text-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-section {
    padding: 7rem 2rem 0;
    background-color: var(--color-background);
    color: var(--color-text-dim);
    display: flex;
    justify-content: center;
}

.about-wrapper {
    width: 100%;
    max-width: var(--container-max);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-title {
    text-align: left;
    width: 100%;
    margin-bottom: 1.2rem;
}

.about-title h2 {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin: 0;
    color: var(--color-accent);
}

.about-title h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 500;
    margin: 0.4rem 0 0;
    color: var(--color-text);
}

.about-content-container {
    display: flex;
    flex-direction: row;
    gap: 4rem;
    width: 100%;
    align-items: center;
}

.about-text {
    flex: 1;
    text-align: left;
    line-height: 1.75;
}

.about-text p:first-child {
    margin-top: 0;
}

.about-text .italic-paragraph {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-text);
    border-left: 2px solid var(--color-accent);
    padding-left: 1.25rem;
    margin: 1.75rem 0;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 30px 60px rgba(18, 24, 43, 0.18);
}

/* Client Logos Section */
.client-logos-section {
    width: 100%;
    text-align: center;
    margin-top: 5rem;
    padding: 2rem 0;
}

.client-logos-section h3 {
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-text-dim);
    margin-bottom: 2.5rem;
}

.logo-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.logo-carousel-track {
    display: flex;
    align-items: center;
    gap: 120px;
    padding: 12px 0;
    animation: scroll 120s linear infinite;
    width: max-content;
    /* The animated transform above creates a new stacking context, which would
       otherwise stop mix-blend-mode on the logos below from reaching the real
       page background — painting the same color here gives them something
       correct to blend against locally */
    background: var(--color-background);
}

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

.logo-carousel:hover .logo-carousel-track {
    animation-play-state: paused;
}

.logo-carousel img {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(1) opacity(0.5);
    mix-blend-mode: multiply;
    transition: transform 0.35s var(--ease), filter 0.35s var(--ease), opacity 0.35s var(--ease);
}

.logo-carousel img:hover {
    transform: scale(1.05);
    z-index: 10;
    filter: none;
    opacity: 1;
}

.logo-carousel-wrapper {
    overflow: visible;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* Contact Form Page */
.contact-page main {
    background-color: var(--color-background);
    color: var(--color-text);
}

#contact-form-section {
    padding: 4rem 2rem 4rem;
}

.contact-form-container {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.contact-form-container h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 500;
    margin-bottom: 1rem;
}

.contact-form-container p {
    font-size: 1.05rem;
    margin-bottom: 3rem;
    color: var(--color-text-dim);
}

.form-group {
    margin-bottom: 1.75rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-text-dim);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 0;
    border: none;
    border-bottom: 1px solid var(--color-border-strong);
    border-radius: 0;
    background: transparent;
    color: var(--color-text);
    font-size: 1rem;
    font-family: var(--font-primary);
    box-sizing: border-box;
    transition: border-color 0.3s var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: none;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 2.25rem;
    text-align: left;
    gap: 0.6rem;
}

.form-group-checkbox input {
    margin: 0;
    accent-color: var(--color-accent);
}

.form-group-checkbox label {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    text-transform: none;
    letter-spacing: normal;
}

#form-status {
    margin-top: 1.5rem;
    font-weight: 500;
}

/* Footer */
.main-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 4rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo .logo-main {
    font-size: 1.5rem;
    color: var(--color-footer-text);
}

.footer-logo .logo-sub {
    font-size: 0.75rem;
    color: var(--color-footer-text-dim);
}

.copyright {
    font-size: 0.78rem;
    color: var(--color-footer-text-dim);
    margin-bottom: 0.4rem;
}

.legal {
    font-size: 0.68rem;
    color: var(--color-footer-text-dim);
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(244, 242, 238, 0.25);
    border-radius: 50%;
    background-color: transparent;
    color: var(--color-footer-text);
    text-decoration: none;
    font-size: 1.05rem;
    transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease);
}

.social-icon:hover {
    background-color: var(--color-accent-on-dark);
    border-color: var(--color-accent-on-dark);
    color: var(--color-footer-bg);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background-color: var(--color-background-elevated);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 8px 24px rgba(18, 24, 43, 0.18);
    visibility: hidden;
    opacity: 0;
    transform: translateY(100px);
    transition: visibility 0.3s, opacity 0.3s, transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
    z-index: 900;
}

.back-to-top-button:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
}

.back-to-top-button.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Attrezzatura Page */
.attrezzatura-page main {
    background-color: var(--color-background);
    color: var(--color-text);
}

.equipment-hero {
    width: 100%;
    height: 320px;
    overflow: hidden;
    position: relative;
    margin-top: calc(-1 * var(--header-height));
}

.equipment-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 65%;
}

.equipment-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 12, 0.1) 0%, rgba(11, 11, 12, 0) 40%, rgba(11, 11, 12, 0.35) 100%);
}

.equipment-section {
    padding: 5rem 4vw 1rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.equipment-item {
    display: flex;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.equipment-section .equipment-text {
    text-align: left;
}

.equipment-text {
    flex: 1;
    text-align: left;
}

.equipment-text h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
}

.equipment-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 500;
    text-align: left;
    color: var(--color-text);
}

.equipment-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text-dim);
    margin: 2rem 0 1rem 0;
}

.equipment-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-dim);
    margin-bottom: 2.5rem;
}

.equipment-image {
    flex: 1;
    display: flex;
    align-items: center;
}

.equipment-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    mix-blend-mode: multiply;
}

.objectives-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
}

.objectives-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 500;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--color-text);
}

.objectives-grid {
    display: grid;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.objectives-section.grid-4 .objectives-grid {
    grid-template-columns: repeat(4, 1fr);
}

.objectives-section.grid-3 .objectives-grid {
    grid-template-columns: repeat(3, 1fr);
}

.objective-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform var(--transition), border-color var(--transition);
}

.objective-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-strong);
}

.objective-item img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: 1rem;
    background: var(--color-background-alt);
    padding: 0.75rem;
    mix-blend-mode: multiply;
}

.objective-item p {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text-dim);
    margin-bottom: 1.5rem;
}

.objective-item .equipment-button {
    padding: 0.7rem 1.4rem;
    font-size: 0.78rem;
}

/* ===== responsive attrezzatura ===== */
@media (max-width: 1200px) {
    .objectives-section.grid-4 .objectives-grid,
    .objectives-section.grid-3 .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .objectives-section.grid-4 .objectives-grid:has(.objective-item:last-child:nth-child(odd)),
    .objectives-section.grid-3 .objectives-grid:has(.objective-item:last-child:nth-child(odd)) {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .grid-3 .objective-item .equipment-button,
    .grid-4 .objective-item .equipment-button {
        display: flex;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
    }
}

@media (max-width: 600px) {
    .objectives-section.grid-4 .objectives-grid,
    .objectives-section.grid-3 .objectives-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

.objective-item .equipment-subtitle {
    order: 1;
}

.objective-item img {
    order: 2;
}

.objective-item p {
    order: 3;
}

.objective-item .equipment-button {
    order: 4;
    justify-content: center;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .objective-item .equipment-button {
        display: flex;
        margin-left: auto;
        margin-right: auto;
        align-self: center;
    }
}

.equipment-subtitle {
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.attrezzatura-page .equipment-heading,
.attrezzatura-page .objectives-section h2 {
    letter-spacing: 0.01em;
}

.attrezzatura-page .equipment-section,
.attrezzatura-page .objectives-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.attrezzatura-page main {
    padding-bottom: 6rem;
}

.attrezzatura-page .equipment-section {
    padding-top: 6rem;
    padding-bottom: 0.3rem;
}

.attrezzatura-page .objectives-section h2 {
    margin: 50px auto 20px auto;
    text-align: center;
}

.attrezzatura-page .equipment-heading {
    margin: 0 0 2rem 0;
}

.attrezzatura-page .equipment-item {
    max-width: none;
    margin: 0;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2.5rem;
}

@media (max-width: 800px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .equipment-item {
        gap: 1.2rem;
        flex-direction: column;
    }

    .attrezzatura-page .equipment-item {
        padding: 1.5rem;
    }

    .equipment-text p {
        margin-bottom: 1rem;
    }

    .equipment-hero {
        height: 280px;
    }
}

/* Video verticale Shorts */
.single-video-container {
    width: 100%;
    max-width: 435px;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 auto;
    border: 1px solid var(--color-border);
}

.single-video-container + .photo-grid {
    margin-top: 3rem;
}

.single-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Griglia foto 3x3 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    width: 90%;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    transition: transform var(--transition);
}

.photo-item {
    overflow: hidden;
    border-radius: 6px;
}

.photo-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        width: 95%;
    }

    .photo-grid:has(.photo-item:last-child:nth-child(odd)) {
        grid-template-columns: 1fr;
    }

    .single-video-container {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
}

.video-wrapper {
    position: relative;
    width: 80%;
    max-width: 1500px;
    aspect-ratio: 16/9;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
}

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

.privacy-link {
    color: var(--color-text-dim);
    text-decoration: underline;
    transition: color 0.3s;
}

.privacy-link:hover {
    color: var(--color-text);
}

/* Tutti i video delle pagine lavoro */
.vertical-video video,
.video-wrapper video,
.single-video-container video {
    display: block;
    width: 105%;
    height: 105%;
    object-fit: cover;
}

.vertical-video video,
.video-wrapper video {
    object-position: center center;
}

/* ===== triple vertical video layout ===== */
.triple-vertical-section,
.work-gallery {
    width: 100%;
    background: var(--color-background);
}

.work-gallery {
    padding-top: 1rem;
}

.triple-vertical-grid {
    max-width: 1400px;
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
}

.triple-vertical-item {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
}

.triple-vertical-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 900px) {
    .triple-vertical-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }

    .triple-vertical-grid:has(.triple-vertical-item:last-child:nth-child(odd)) {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
}

@media (max-width: 560px) {
    .triple-vertical-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
}

.layout-triple-vertical .triple-vertical-grid {
    margin-top: 0;
    margin-bottom: 0;
}

.vertical-video-grid {
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    justify-content: center;
}

.vertical-video {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    aspect-ratio: 9/16;
    overflow: hidden;
    background: var(--color-background-alt);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.vertical-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vertical-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.work-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

.hero-video-desktop {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-mobile {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

@media (max-width: 768px) {
    .hero-video-desktop {
        display: none;
        pointer-events: none;
    }
    .hero-video-mobile {
        display: block;
        z-index: -1;
    }
}

/* ===== Legal / Privacy pages ===== */
.legal-page main {
    background: var(--color-background);
    color: var(--color-text-dim);
}

.legal-page-section {
    max-width: 780px;
    margin: 0 auto;
    padding: 6.5rem 2rem 5rem;
}

.legal-page-section h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 2rem;
}

.legal-page-section h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-accent);
    margin: 2.25rem 0 0.75rem;
}

.legal-page-section p {
    line-height: 1.75;
    margin: 0 0 1rem;
}

.legal-page-section strong {
    color: var(--color-text);
}

/* Nav switches to the fullscreen hamburger menu earlier than the general
   768px breakpoint because the horizontal nav (logo + 4 links + lang pill)
   starts clipping the last item off-screen around ~820px. */
@media (max-width: 900px) {
    .main-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background-color: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-16px);
        transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease), transform 0.35s var(--ease);
        z-index: 999;
    }

    .main-nav.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 2.25rem;
    }

    .main-nav a {
        font-size: 1.5rem;
        font-family: var(--font-display);
        letter-spacing: 0.01em;
        text-transform: none;
    }

    .hamburger-menu {
        display: block;
    }
}

/* ===== Mobile nav & general responsive ===== */
@media (max-width: 768px) {
    .hero-cta-container {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .hero-cta-button {
        flex-basis: auto;
        width: 85%;
        max-width: 420px;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .about-content-container {
        flex-direction: column;
    }

    .about-text {
        order: 2;
    }

    .about-image {
        order: 1;
    }

    .work-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .detail-text {
        text-align: center;
    }

    .objective-item {
        display: flex;
        flex-direction: column;
    }
}

.vertical-video-grid {
    max-width: 900px;
}

@media (max-width: 768px) {
    body.layout-vertical-video .vertical-video-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: calc(100vh - var(--header-height));
        min-height: calc(100dvh - var(--header-height));
        justify-content: center;
        padding: 2rem 0;
        overflow: visible;
    }

    body.home-page .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: var(--header-height);
        /* Grid a righe elastiche: la riga sopra il titolo e' un po' piu'
           ampia (piu' respiro dal menu), le due attorno a "scorri" restano
           UGUALI tra loro cosi' resta centrato, ne' incollato ai bottoni
           ne' al fondo, qualunque sia l'altezza del blocco titolo+bottoni.
           Nessun calcolo JS. */
        display: grid;
        grid-template-rows: 1.6fr auto minmax(1.5rem, 1fr) auto 1fr;
        justify-items: center;
    }

    body.home-page .hero-body {
        display: flex;
        flex-direction: column;
        align-items: center;
        grid-row: 2;
    }

    body.home-page .hero-scroll-cue {
        grid-row: 4;
    }

    .hero-cta-container {
        margin-top: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
    }
}

.hero-content,
.hero-content * {
    text-shadow:
        0 3px 14px rgba(0, 0, 0, 0.55),
        0 1px 4px rgba(0, 0, 0, 0.35);
}
