@font-face {
    font-family: Montserrat;
    src: url("risorse/font/montserrat-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

:root {
    --ef-ink: #151616;
    --ef-pink: #ff3264;
    --ef-lime: #baff6e;
    --ef-white: #ffffff;
    --ef-soft: #d3d5d3;
    --ef-rule: #3a3c39;
    --ef-task-integration: #A49BFA;
    --ef-task-development: #65C5EF;
    --ef-task-client: #FFBE70;
    --ef-task-internal: #5AD5C0;
    --ef-gutter: clamp(1.25rem, 5.55vw, 6rem);
    --ef-font: Montserrat, system-ui, sans-serif;
    --bs-body-font-family: var(--ef-font);
    --bs-body-bg: var(--ef-ink);
    --bs-body-color: var(--ef-white);
    scroll-behavior: auto;
}

body {
    font-family: var(--ef-font);
    font-synthesis: none;
    line-height: 1.55;
}

::selection {
    background: var(--ef-lime);
    color: var(--ef-ink);
}

:where(a):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 6px;
}

p, h1, h2, ul {
    margin: 0;
}

.frame {
    inline-size: min(calc(100% - var(--ef-gutter) * 2), 90rem);
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 20;
    inset: .75rem auto auto .75rem;
    padding: .8rem 1rem;
    transform: translateY(calc(-100% - 1rem));
    background: var(--ef-lime);
    color: var(--ef-ink);
    font-weight: 650;
}

.skip-link:focus {
    transform: none;
}

.demo-link {
    --demo-ink: var(--ef-ink);
    --demo-hover: var(--ef-white);
    position: fixed;
    z-index: 18;
    inset-block-start: max(clamp(.625rem, 1.55vw, 1.25rem), calc(env(safe-area-inset-top, 0px) + .4rem));
    inset-inline-end: max(clamp(.75rem, 3vw, 2.5rem), calc(env(safe-area-inset-right, 0px) + .5rem));
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-block-size: 2.75rem;
    padding-inline: .8rem;
    border: 1px solid currentColor;
    border-color: color-mix(in srgb, currentColor 50%, transparent);
    border-radius: 100vmax;
    background: transparent;
    color: var(--demo-ink);
    font-size: .8125rem;
    font-weight: 550;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility 0s linear .16s;
}

.demo-link svg {
    inline-size: .75rem;
    block-size: .75rem;
}

.demo-link[data-demo-tone="white"] {
    --demo-ink: var(--ef-white);
    --demo-hover: var(--ef-ink);
}

.demo-link[data-demo-tone="black"] { --demo-ink: #000; }

.demo-link[data-demo-visible] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.demo-link[data-demo-cut] { transition: none; }

@media (hover: hover) {
    .demo-link:hover {
        border-color: var(--demo-ink);
        background: var(--demo-ink);
        color: var(--demo-hover);
    }
}

.demo-link:focus-visible {
    outline: 2px solid var(--demo-ink);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .demo-link { transition: none; }
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 2.75rem;
    color: inherit;
}

.brand img {
    display: block;
    block-size: auto;
}

/* 01 · Prologo */
.prologue {
    display: grid;
    min-block-size: 100vh;
    min-block-size: 100svh;
}

.prologue__composition {
    display: grid;
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    gap: clamp(.5rem, 1.4vw, 1.6rem);
    align-items: center;
    padding-block: clamp(3rem, 6vh, 6rem);
}

.prologue__copy {
    position: relative;
    z-index: 2;
}

.prologue__title {
    font-size: clamp(3.65rem, 6.15vw, 6.7rem);
    font-weight: 750;
    line-height: .96;
    letter-spacing: -.076em;
}

.prologue__title em,
.payoff em {
    color: var(--ef-lime);
    font-style: normal;
}

.prologue__detail {
    margin-block-start: clamp(1.45rem, 3.2vh, 2.2rem);
}

.prologue__description {
    max-inline-size: 34rem;
    color: var(--ef-soft);
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.55;
}

.prologue__art {
    position: relative;
    display: grid;
    place-items: center;
    justify-self: center;
    inline-size: 100%;
    max-inline-size: 35rem;
    aspect-ratio: 1;
    color: var(--ef-rule);
    pointer-events: none;
}

.prologue__mark {
    position: relative;
    z-index: 3;
    inline-size: 100%;
    aspect-ratio: 1;
    transform-origin: center;
}

.prologue__mark svg {
    display: block;
    inline-size: 100%;
    block-size: auto;
    overflow: visible;
}

.prologue__guides {
    position: absolute;
    inset: 3%;
}

.prologue__axis {
    position: absolute;
    background: currentColor;
}

.prologue__axis--horizontal {
    inset: 50% 0 auto;
    block-size: 1px;
}

.prologue__axis--vertical {
    inset: 0 auto 0 50%;
    inline-size: 1px;
}

.prologue__guide-dot {
    position: absolute;
    inset: 50% 0 auto auto;
    inline-size: 5px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ef-lime);
    transform: translateY(-50%);
}

/* 02 · Composizioni in flusso naturale */
.chaos {
    position: relative;
    background: var(--ef-ink);
}

.chaos-static {
    padding-block: clamp(4rem, 9vw, 8rem);
}

.static-beat {
    max-inline-size: 64rem;
    margin-inline: auto;
}

.static-beat--order {
    margin-block-start: clamp(3.5rem, 9vw, 8rem);
    padding-block-start: clamp(3rem, 6vw, 6rem);
    border-top: 1px solid var(--ef-rule);
}

.static-beat__headline,
.static-beat__thought {
    max-inline-size: 17ch;
    font-size: clamp(2.15rem, 5.1vw, 5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.062em;
    text-wrap: balance;
}

.static-beat__headline {
    margin-block-start: .7rem;
}

.static-field {
    position: relative;
    max-inline-size: 51rem;
    min-block-size: clamp(14rem, 44vw, 21rem);
    display: grid;
    align-items: center;
    margin: 1.75rem auto;
    padding: .3rem clamp(1rem, 5vw, 5rem);
    list-style: none;
}

.static-field--scatter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: .85rem;
    background-image:
        linear-gradient(var(--ef-rule), var(--ef-rule)),
        linear-gradient(90deg, var(--ef-rule), var(--ef-rule));
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1px 85%, 100% 1px;
}

.static-field--scatter > li {
    position: relative;
    justify-self: start;
    padding-inline-start: .82rem;
    font-weight: 600;
    font-size: clamp(.875rem, 2.4vw, 1.15rem);
    transform: translate(var(--drift-x, 0), var(--drift-y, 0));
}

.static-field--scatter > li:nth-child(even) {
    justify-self: end;
}

.static-field--scatter > li:nth-child(4n + 1) {
    --drift-y: 8px;
}

.static-field--scatter > li:nth-child(4n + 2) {
    --drift-x: -.75rem;
    --drift-y: -9px;
}

.static-field--scatter > li:nth-child(4n + 3) {
    --drift-x: 1.15rem;
    --drift-y: -7px;
}

.static-field--scatter > li::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 0;
    inline-size: 5px;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translateY(-50%);
    background: var(--ef-pink);
}

.static-field--order {
    justify-items: center;
    min-block-size: 0;
    margin-block: 2.15rem 2.6rem;
    padding: 0;
}

.static-field--order ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
    gap: .6rem 1rem;
    inline-size: min(100%, 37rem);
    padding: .8rem 0 0;
    border-top: 1px solid var(--ef-rule);
    color: var(--ef-soft);
    font-size: clamp(.875rem, 1.8vw, 1.1rem);
    font-weight: 550;
    list-style: none;
}

.payoff {
    font-size: clamp(3.4rem, 8.7vw, 8.5rem);
    font-weight: 750;
    line-height: .94;
    letter-spacing: -.079em;
}

.final-brand svg {
    display: block;
    inline-size: 100%;
    block-size: auto;
}

.final-brand__wordmark {
    fill: var(--ef-white);
}

.static-finale {
    display: grid;
    justify-items: center;
    gap: clamp(1.35rem, 4vw, 3rem);
    text-align: center;
}

.static-finale__logo {
    inline-size: min(100%, clamp(13.5rem, 65vw, 28rem));
}

.phase-outro {
    background: var(--ef-white);
    color: var(--ef-ink);
}

.phase-outro__inner {
    max-inline-size: 64rem;
    padding-block: clamp(3.25rem, calc(1.65rem + 3.9vw), 5.75rem)
        clamp(2.85rem, calc(1.45rem + 3.15vw), 5rem);
    color: #555857;
    font-size: .8125rem;
    line-height: 1.65;
}

.phase-outro a {
    color: var(--ef-ink);
    font-weight: 550;
    text-underline-offset: .25em;
}

.phase-outro__contacts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 1.75rem 3rem;
    align-items: start;
}

.phase-outro__credit {
    display: grid;
    justify-items: start;
    gap: .6rem;
}

.phase-outro__brand img {
    display: block;
    inline-size: 5.5rem;
    block-size: auto;
}

.phase-outro__address {
    margin: 0;
    font-style: normal;
    text-align: end;
}

.phase-outro__channels,
.phase-outro__legal,
.phase-outro__privacy {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
}

.phase-outro__channels {
    justify-content: end;
    margin-block-start: .55rem;
}

.phase-outro__meta {
    display: grid;
    gap: .8rem;
    margin-block-start: clamp(1.75rem, 3vw, 2.75rem);
    border-block-start: 1px solid #e3e5e2;
    padding-block-start: clamp(1.05rem, 2vw, 1.5rem);
    font-size: .78125rem;
}

.phase-outro__legal { max-inline-size: 54rem; }

.phase-outro__legal strong {
    color: var(--ef-ink);
    font-weight: 600;
}

@media (max-width: 40rem) {
    .phase-outro__contacts { grid-template-columns: minmax(0, 1fr); }
    .phase-outro__address { text-align: start; }
    .phase-outro__channels { justify-content: start; }

    .phase-outro__legal,
    .phase-outro__privacy {
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
    }
}

/* Palco con pin: attivo soltanto quando il motion è inizializzato. */
.chaos-stage {
    display: none;
}

.motion-active .chaos-static {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.motion-active .chaos-stage {
    display: block;
}

.chaos-stage {
    block-size: 100vh;
    block-size: 100svh;
    min-block-size: 39rem;
    background: var(--ef-ink);
}

.chaos-stage__inner {
    position: relative;
    display: grid;
    grid-template-rows: clamp(7rem, 19vh, 11rem) minmax(0, 1fr);
    block-size: 100%;
    padding-block: clamp(2.3rem, 5vh, 4rem) clamp(2rem, 5vh, 4rem);
}

.chaos-stage__copy {
    position: relative;
}

.stage-copy {
    position: absolute;
    inset: 0 0 auto;
    max-inline-size: 19ch;
    font-size: clamp(2.6rem, 5.2vw, 5.2rem);
    font-weight: 710;
    line-height: .98;
    letter-spacing: -.065em;
    text-wrap: balance;
}

.stage-copy--2 {
    max-inline-size: 34ch;
    font-size: clamp(2.45rem, 4.55vw, 4.7rem);
}

.chaos-field {
    position: relative;
}

.chaos-field__geometry {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    overflow: visible;
}

.chaos-field__geometry :is(path, line) {
    fill: none;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.chaos-field__guides path {
    stroke: var(--ef-rule);
}

.chaos-field__links line {
    stroke: var(--ef-pink);
    stroke-opacity: .6;
}

.chaos-field__signal {
    --signal-size: .85rem;
    position: absolute;
    inset: 50% auto auto 50%;
    display: block;
    inline-size: var(--signal-size);
    aspect-ratio: 1;
    margin-block-start: calc(var(--signal-size) * -.5);
    margin-inline-start: calc(var(--signal-size) * -.5);
    border-radius: 50%;
    background: var(--ef-lime);
}

.chaos-field__mark-anchor {
    position: absolute;
    inset: 50% auto auto 50%;
    inline-size: clamp(9rem, 15vw, 13rem);
}

.chaos-field__mark svg {
    display: block;
    inline-size: 100%;
    block-size: auto;
}

.chaos-field__tokens {
    margin: 0;
    padding: 0;
    list-style: none;
}

.chaos-token {
    position: absolute;
    inset: 50% auto auto 50%;
    display: flex;
    align-items: center;
    inline-size: 0;
    block-size: 0;
}

.chaos-token__dot {
    position: absolute;
    inset: 0;
    inline-size: .42rem;
    block-size: .42rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--ef-pink);
}

.chaos-token__word {
    position: absolute;
    inset: 0 auto auto .82rem;
    transform: translateY(-50%);
    color: var(--ef-white);
    background-color: var(--ef-ink);
    font-size: clamp(1rem, 1.5vw, 1.43rem);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.chaos-token:nth-child(-n + 4) .chaos-token__word {
    inset: 0 .82rem auto auto;
}

.chaos-finale {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    row-gap: clamp(1.3rem, 4vh, 2.8rem);
    text-align: center;
    pointer-events: none;
}

.chaos-finale__logo {
    inline-size: clamp(21rem, 37vw, 35rem);
}

/* Composizione adattiva */
@media (max-width: 899px) {
    .prologue__composition {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(1.5rem, 6vw, 3.75rem);
        padding-block: clamp(2.75rem, 7vw, 4rem) 2rem;
    }

    .prologue__title {
        max-inline-size: 14ch;
        font-size: clamp(2.4rem, 8.5vw, 4.65rem);
        line-height: .99;
    }

    .hero-break {
        display: none;
    }

    .prologue__art {
        justify-self: end;
        inline-size: clamp(11.5rem, 55vw, 20rem);
        margin-inline-end: clamp(0rem, 5vw, 3rem);
    }
}

@media (max-width: 480px) {
    .prologue__title {
        font-size: clamp(2.35rem, 10.1vw, 2.9rem);
        max-inline-size: 100%;
    }

    .static-field {
        margin-block: 1.3rem 1.85rem;
    }

    .static-field--order ul {
        gap: .55rem .35rem;
    }
}

@media (max-height: 710px) and (min-width: 900px) {
    .prologue__composition {
        padding-block: 1.65rem;
    }

    .prologue__title {
        font-size: clamp(3.05rem, min(5.9vw, 10.7vh), 5.55rem);
    }

    .prologue__art {
        inline-size: min(100%, 68vh);
    }
}

