/* ==========================================================================
   BIOLINK STUDIO — HOME
   ========================================================================== */

/* ------------------------------------------------------------------- HERO */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--nav-h) + clamp(30px, 7vh, 70px));
    padding-bottom: clamp(60px, 10vh, 110px);
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    width: 100%;
}

.hero__copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5.2vw, 4.7rem);
    line-height: .98;
    letter-spacing: -.045em;
}

.hero h1 .gradient-text {
    display: inline;
}

.hero__lead {
    max-width: 46ch;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero__trust {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
    font-size: .87rem;
    color: var(--txt-dim);
}

.hero__avatars {
    display: flex;
}

.hero__avatars span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--ink-900);
    margin-left: -11px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}

.hero__avatars span:first-child {
    margin-left: 0;
}

.hero__stars {
    color: var(--c-b);
    letter-spacing: .1em;
}

/* --- telefono mock --- */
.hero__visual {
    position: relative;
    display: grid;
    place-items: center;
    perspective: 1400px;
}

.phone-mock {
    position: relative;
    width: min(300px, 74vw);
    aspect-ratio: 41 / 82;
    border-radius: 42px;
    padding: 11px;
    background: linear-gradient(160deg, #23283a, #0a0c14 55%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .09),
        0 50px 100px -30px rgba(0, 0, 0, .9),
        0 0 90px -20px rgba(0, 217, 255, .35);
    transform-style: preserve-3d;
    transition: transform .5s var(--ease);
    z-index: 2;
}

.phone-mock__screen {
    position: relative;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(109, 93, 251, .5), transparent 60%),
        linear-gradient(180deg, #0d1020, #06070d);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 18px 18px;
    gap: 9px;
}

.phone-mock__notch {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 74px;
    height: 18px;
    border-radius: 99px;
    background: #05060b;
    z-index: 3;
}

.pm-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--grad);
    background-size: 200% 100%;
    animation: hue-slide 6s linear infinite;
    box-shadow: 0 8px 26px -6px rgba(0, 217, 255, .7);
    flex: none;
}

.pm-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: -.02em;
    margin-top: 4px;
}

.pm-bio {
    font-size: .68rem;
    color: var(--txt-dim);
    margin-bottom: 6px;
}

.pm-link {
    position: relative;
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    font-size: .72rem;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    animation: pm-rise .7s var(--ease) backwards;
    animation-delay: calc(1.1s + var(--i) * .12s);
}

.pm-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: pm-shine 3.4s var(--ease) infinite;
    animation-delay: calc(2s + var(--i) * .4s);
}

@keyframes pm-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes pm-shine {

    0%,
    72% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.pm-socials {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-bottom: 6px;
    color: var(--txt-soft);
}

.pm-socials svg {
    width: 17px;
    height: 17px;
}

.pm-brand {
    font-size: .58rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--txt-dim);
}

/* schede fluttuanti attorno al telefono */
.hero__float {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: rgba(12, 14, 24, .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9);
    font-size: .78rem;
    white-space: nowrap;
}

.hero__float b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -.03em;
}

.hero__float small {
    display: block;
    color: var(--txt-dim);
    font-size: .64rem;
    letter-spacing: .02em;
}

.hero__float i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--grad-soft);
    border: 1px solid var(--line);
    flex: none;
}

.hero__float i svg {
    width: 16px;
    height: 16px;
}

.hero__float--1 {
    top: 3%;
    left: 0;
    animation: float-y 6.5s ease-in-out infinite;
}

.hero__float--2 {
    bottom: 26%;
    right: 0;
    animation: float-y 7.8s ease-in-out infinite .8s;
}

.hero__float--3 {
    bottom: 1%;
    left: 2%;
    animation: float-y 8.6s ease-in-out infinite 1.6s;
}

@media (max-width: 1200px) {
    .hero__float--3 {
        display: none;
    }
}

/* anello che ruota dietro al telefono */
.hero__ring {
    position: absolute;
    width: min(430px, 88vw);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, .12);
    animation: spin-slow 42s linear infinite;
    z-index: 1;
}

.hero__ring::before,
.hero__ring::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-b);
    box-shadow: 0 0 18px var(--c-b);
    top: -5px;
    left: 50%;
}

.hero__ring::after {
    top: auto;
    bottom: -5px;
    background: var(--c-c);
    box-shadow: 0 0 18px var(--c-c);
}

.hero__orb-a {
    top: -14%;
    right: -8%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(109, 93, 251, .5), transparent 65%);
}

.hero__orb-b {
    bottom: -20%;
    left: -12%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 217, 255, .32), transparent 65%);
}

/* indicatore di scroll */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: .66rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--txt-dim);
    z-index: 4;
}

.scroll-cue span {
    width: 1px;
    height: 46px;
    background: linear-gradient(180deg, var(--c-b), transparent);
    animation: cue 2.2s ease-in-out infinite;
    transform-origin: top;
}

@keyframes cue {

    0%,
    100% {
        transform: scaleY(.25);
        opacity: .4;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* --------------------------------------------------------------- SERVIZI */
.stack {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vw, 44px);
}

.stack-card {
    position: sticky;
    top: calc(var(--nav-h) + clamp(16px, 4vh, 46px));
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(26px, 4vw, 56px);
    align-items: center;
    padding: clamp(28px, 4vw, 52px);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(20, 23, 36, .92), rgba(8, 9, 16, .94));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 40px 90px -50px #000;
    transform-origin: center top;
    will-change: transform;
    overflow: hidden;
}

.stack-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--card-glow, radial-gradient(70% 90% at 100% 0%, rgba(0, 217, 255, .16), transparent 60%));
    pointer-events: none;
}

.stack-card__n {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .78rem;
    letter-spacing: .2em;
    color: var(--txt-dim);
    margin-bottom: 16px;
    display: block;
}

.stack-card h3 {
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
    margin-bottom: 16px;
}

.stack-card p {
    color: var(--txt-soft);
    max-width: 46ch;
}

.stack-card__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.stack-card__list li {
    padding: .42em .9em;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    font-size: .78rem;
    color: var(--txt-soft);
}

.stack-card__cta {
    margin-top: 30px;
}

.stack-card__art {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .025);
    overflow: hidden;
    display: grid;
    place-items: center;
}

.stack-card__art svg {
    width: 62%;
    height: auto;
    opacity: .95;
}

.stack-card__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .07) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: art-sheen 6s var(--ease) infinite;
}

@keyframes art-sheen {

    0%,
    70% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* -------------------------------------------------------------- MANIFESTO */
.manifesto {
    text-align: center;
}

.manifesto__text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4.6vw, 3.6rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -.035em;
    max-width: 18ch;
    margin-inline: auto;
    text-wrap: balance;
}

/* -------------------------------------------------------------- TEMPLATES */
.tpl-rows {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2.4vw, 26px);
    --mq-gap: clamp(16px, 2.4vw, 26px);
}

.tpl-card {
    position: relative;
    flex: none;
    width: clamp(150px, 20vw, 208px);
    aspect-ratio: 41 / 79;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--ink-700);
    transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}

.tpl-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease), filter .5s;
    filter: saturate(.92);
}

.tpl-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--line-strong);
    box-shadow: 0 30px 60px -30px rgba(0, 217, 255, .55);
}

.tpl-card:hover img {
    transform: scale(1.07);
    filter: saturate(1.1);
}

.tpl-card__tag {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: .3em .7em;
    border-radius: var(--r-pill);
    background: rgba(6, 7, 13, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    font-size: .66rem;
    letter-spacing: .02em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s, transform .4s var(--ease);
}

.tpl-card:hover .tpl-card__tag {
    opacity: 1;
    transform: none;
}

.tpl-foot {
    display: flex;
    justify-content: center;
    margin-top: clamp(38px, 5vw, 60px);
}

/* --------------------------------------------------------------- PROCESSO */
.pin {
    position: relative;
}

.pin__inner {
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.pin__head {
    padding-inline: var(--gutter);
    margin-bottom: clamp(24px, 4vh, 48px);
    max-width: 640px;
}

.pin__track {
    display: flex;
    gap: clamp(18px, 2.4vw, 32px);
    padding-inline: var(--gutter);
    will-change: transform;
}

.step {
    position: relative;
    flex: none;
    width: clamp(280px, 34vw, 460px);
    padding: clamp(24px, 2.4vw, 36px);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(23, 27, 41, .9), rgba(8, 9, 16, .92));
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: clamp(300px, 44vh, 400px);
    transition: border-color .4s, transform .5s var(--ease);
}

.step:hover {
    border-color: var(--line-strong);
}

.step__n {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -.06em;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: .95;
}

.step h3 {
    font-size: clamp(1.2rem, 1.9vw, 1.6rem);
}

.step p {
    color: var(--txt-soft);
    font-size: .95rem;
}

.step__meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--txt-dim);
}

.pin__bar {
    margin: clamp(20px, 3vh, 34px) var(--gutter) 0;
    height: 2px;
    background: rgba(255, 255, 255, .09);
    border-radius: 99px;
    overflow: hidden;
}

.pin__bar i {
    display: block;
    height: 100%;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

/* fallback mobile: scroller orizzontale */
.pin.pin-off {
    height: auto !important;
}

.pin.pin-off .pin__inner {
    position: static;
    height: auto;
    padding-block: 10px;
}

.pin.pin-off .pin__track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 18px;
    scrollbar-width: none;
    transform: none !important;
}

.pin.pin-off .pin__track::-webkit-scrollbar {
    display: none;
}

.pin.pin-off .step {
    scroll-snap-align: center;
    width: min(78vw, 330px);
}

/* -------------------------------------------------------------- TCG BLOCK */
.tcg-feature {
    position: relative;
    padding: clamp(34px, 5vw, 72px);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    overflow: hidden;
    background:
        radial-gradient(90% 130% at 100% 0%, rgba(255, 77, 157, .18), transparent 58%),
        radial-gradient(80% 120% at 0% 100%, rgba(0, 217, 255, .16), transparent 58%),
        linear-gradient(160deg, rgba(20, 23, 36, .9), rgba(7, 8, 15, .95));
}

.tcg-feature__grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(30px, 4vw, 60px);
    align-items: center;
}

.tcg-feature h2 {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    margin-block: 18px;
}

.tcg-feature p {
    color: var(--txt-soft);
    max-width: 48ch;
}

.tcg-feature__cta {
    margin-top: 30px;
}

.clients {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.client-logo {
    position: relative;
    width: clamp(84px, 12vw, 120px);
    aspect-ratio: 1;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    overflow: hidden;
    display: grid;
    place-items: center;
    transition: transform .5s var(--ease), border-color .4s;
}

.client-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) brightness(1.15);
    opacity: .68;
    transition: filter .5s, opacity .5s, transform .6s var(--ease);
}

.client-logo:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
}

.client-logo:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.06);
}

/* ----------------------------------------------------------------- NUMERI */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.stat {
    padding: clamp(24px, 3vw, 40px) clamp(18px, 2vw, 28px);
    background: rgba(8, 9, 16, .82);
    text-align: center;
    transition: background .4s;
}

.stat:hover {
    background: rgba(20, 23, 36, .9);
}

.stat b {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: 1;
    background: var(--grad);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: hue-slide 8s linear infinite;
}

.stat span {
    display: block;
    margin-top: 10px;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--txt-dim);
}

/* -------------------------------------------------------------------- FAQ */
.acc-item {
    border-bottom: 1px solid var(--line);
}

.acc-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(20px, 2.4vw, 30px) 0;
    text-align: left;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.02rem, 1.7vw, 1.32rem);
    font-weight: 500;
    letter-spacing: -.02em;
    color: var(--txt);
    transition: color .3s;
}

.acc-head:hover {
    color: var(--c-b);
}

.acc-icon {
    position: relative;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    transition: transform .5s var(--ease), background .4s, border-color .4s;
}

.acc-icon::before,
.acc-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 1.5px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform .45s var(--ease), opacity .3s;
}

.acc-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.acc-item.is-open .acc-icon {
    transform: rotate(180deg);
    background: var(--grad-soft);
    border-color: var(--line-strong);
}

.acc-item.is-open .acc-icon::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0);
}

.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .6s var(--ease), opacity .4s;
    opacity: 0;
}

.acc-item.is-open .acc-body {
    opacity: 1;
}

.acc-body p {
    padding-bottom: clamp(20px, 2.4vw, 28px);
    color: var(--txt-soft);
    max-width: 68ch;
}

/* -------------------------------------------------------------- CTA FINALE */
.cta-final {
    position: relative;
    text-align: center;
    padding-block: clamp(90px, 14vw, 190px);
    overflow: hidden;
}

.cta-final h2 {
    font-size: clamp(2.4rem, 8vw, 6rem);
    line-height: .95;
    margin-bottom: 26px;
}

.cta-final__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 38px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: clamp(46px, 6vw, 70px);
    text-align: left;
}

.contact-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    transition: transform .5s var(--ease), border-color .4s, background .4s;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .055);
}

.contact-card i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--grad-soft);
    border: 1px solid var(--line);
    flex: none;
}

.contact-card svg {
    width: 19px;
    height: 19px;
}

.contact-card b {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: -.02em;
}

.contact-card small {
    color: var(--txt-dim);
    font-size: .82rem;
}

.contact-card__go {
    margin-left: auto;
    color: var(--txt-dim);
    transition: transform .45s var(--ease), color .3s;
}

.contact-card:hover .contact-card__go {
    transform: translateX(5px);
    color: var(--c-b);
}

/* ------------------------------------------------------------- RESPONSIVE */
@media (max-width: 1024px) {

    .hero__grid,
    .stack-card,
    .tcg-feature__grid {
        grid-template-columns: 1fr;
    }

    .hero__grid {
        gap: clamp(46px, 8vw, 70px);
    }

    .stack-card__art {
        display: none;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-h) + 26px);
    }

    .hero__copy {
        align-items: center;
        text-align: center;
    }

    .hero__cta {
        justify-content: center;
    }

    .hero__trust {
        justify-content: center;
    }

    .hero h1 {
        font-size: clamp(2.4rem, 10.5vw, 3.6rem);
    }

    .scroll-cue {
        display: none;
    }

    .stack-card {
        position: static;
    }

    .hero__float--1 {
        left: -2%;
        top: 4%;
    }

    .hero__float--2 {
        right: -2%;
    }

    .hero__float--3 {
        display: none;
    }
}

@media (max-width: 560px) {
    .hero__float {
        padding: 9px 12px;
        font-size: .7rem;
    }

    .hero__float i {
        width: 28px;
        height: 28px;
    }

    .stack-card {
        padding: 26px 20px;
    }
}
