/* Pagina SgolIA – stile ripreso dalla brochure, adattato a desktop e mobile */

:root {
    --ai-ink: #2b3060;
    --ai-ink-2: #3a4270;
    --ai-ink-3: #4a5080;
    --ai-purple: #6a5fd8;
    --ai-blue: #1fa3e0;
    --ai-pink: #d9449e;
    --ai-radius: 24px;
    --ai-shadow: 0 8px 24px rgba(140, 110, 200, 0.10);
}

body.ai-page {
    font-family: 'Nunito', 'Poppins', sans-serif;
    color: var(--ai-ink);
    background:
        radial-gradient(60% 40% at 0% 0%, #bfeafc 0%, transparent 70%),
        radial-gradient(50% 35% at 100% 8%, #e7e0fc 0%, transparent 70%),
        radial-gradient(60% 40% at 100% 70%, #fbe6f3 0%, transparent 70%),
        radial-gradient(55% 40% at 0% 85%, #d6f0fb 0%, transparent 70%),
        linear-gradient(160deg, #f3fbff 0%, #f8f5ff 50%, #fdf7fb 100%);
    background-attachment: fixed;
}

@media (max-width: 760px) {
    body.ai-page {
        background-attachment: scroll;
    }
}

.ai-page h1,
.ai-page h2,
.ai-page h3 {
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.ai-page .site-nav .nav-links a.is-active {
    color: var(--ai-purple);
}


/* Hero */

.ai-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.25rem 5rem;
    overflow: hidden;
    isolation: isolate;
}

.ai-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: .55;
    pointer-events: none;
    animation: ai-drift 9s ease-in-out infinite;
}

.ai-bubble:nth-child(2) {
    animation-delay: -3s;
}

.ai-bubble:nth-child(3) {
    animation-delay: -5s;
}

.ai-bubble:nth-child(4) {
    animation-delay: -7s;
}

@keyframes ai-drift {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

.ai-hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.ai-hero-content.visible {
    opacity: 1;
    transform: none;
}

.ai-eyebrow {
    font-size: .85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ai-ink-3);
    margin: 0 0 .5rem;
}

.ai-logo {
    width: min(420px, 78vw);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 14px 30px rgba(120, 90, 210, .18));
}

.ai-tag {
    font-size: clamp(1.6rem, 4.2vw, 2.5rem);
    color: var(--ai-purple);
    margin-top: .75rem;
}

.ai-tag .a {
    color: var(--ai-blue);
}

.ai-tag .f {
    color: var(--ai-pink);
}

.ai-intro {
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    line-height: 1.55;
    color: var(--ai-ink-2);
    max-width: 760px;
    margin: 1rem auto 1.75rem;
}

.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}

.ai-btn {
    display: inline-block;
    padding: .8em 1.9em;
    border-radius: 999px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(120deg, var(--ai-blue) 0%, var(--ai-purple) 55%, var(--ai-pink) 100%);
    background-size: 160% 100%;
    box-shadow: 0 8px 20px rgba(106, 95, 216, .28);
    transition: transform .3s ease, box-shadow .3s ease, background-position .4s ease;
}

.ai-btn:hover,
.ai-btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(106, 95, 216, .36);
    background-position: 100% 0;
}

.ai-btn.ghost {
    background: rgba(255, 255, 255, .75);
    color: var(--ai-purple);
    border-color: rgba(106, 95, 216, .35);
    box-shadow: none;
}

.ai-btn.ghost:hover,
.ai-btn.ghost:focus-visible {
    background: #fff;
    box-shadow: 0 8px 18px rgba(106, 95, 216, .15);
}

.ai-page .scroll-arrow {
    color: var(--ai-purple);
}


/* Sezioni e card */

.ai-section {
    padding: 1.25rem 1.25rem;
    max-width: 1140px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

.ai-section.visible {
    opacity: 1;
    transform: none;
}

.ai-section:first-of-type {
    padding-top: 1rem;
}

.ai-card {
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: var(--ai-radius);
    box-shadow: var(--ai-shadow);
    backdrop-filter: blur(6px);
    padding: 1.75rem;
}

.ai-card h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.6rem);
    margin-bottom: 1rem;
}

.ai-row {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .ai-row {
        grid-template-columns: 1.3fr 1fr;
        align-items: start;
    }
}


/* Chat demo */

.msg {
    border-radius: 18px;
    padding: .75rem 1rem;
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: .75rem;
    max-width: 92%;
}

.msg.me {
    margin-left: auto;
    background: linear-gradient(135deg, #c9eefd, #dcd6fd);
    border-bottom-right-radius: 6px;
}

.msg.ai {
    background: linear-gradient(135deg, #fde2f3, #ece4fe);
    border-bottom-left-radius: 6px;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

.msg.ai img {
    width: 40px;
    height: 40px;
    flex: none;
}

.msg.ai small {
    display: block;
    color: #7a6fa8;
    font-size: .85rem;
    margin-top: .35rem;
    font-style: italic;
}

.msg.ai b,
.ai-priv b {
    color: var(--ai-ink);
    font-weight: 800;
}


/* Chip di esempio */

.chip {
    display: block;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.4;
    padding: .7rem 1rem;
    border-radius: 16px;
    margin-bottom: .6rem;
    color: var(--ai-ink-2);
}

.chip:nth-of-type(odd) {
    background: #dcf2fc;
}

.chip:nth-of-type(even) {
    background: #fbe3f3;
}


/* Privacy */

.ai-priv {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    background: linear-gradient(120deg, rgba(214, 240, 252, .85), rgba(234, 228, 251, .85) 50%, rgba(251, 227, 243, .85));
}

.ai-priv > img {
    width: 120px;
    height: 120px;
    justify-self: center;
}

@media (min-width: 760px) {
    .ai-priv {
        grid-template-columns: auto 1fr;
        padding: 2rem 2.5rem;
    }
    .ai-priv > img {
        width: 150px;
        height: 150px;
    }
}

.ai-priv h2 {
    margin-bottom: .5rem;
}

.ai-priv ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--ai-ink-2);
}

.ai-priv li {
    position: relative;
    padding-left: 1.4rem;
    margin-top: .6rem;
}

.ai-priv li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .55em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3cc4f2, #e848bc);
}


/* Benefici */

.ai-ben {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
    .ai-ben {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ai-ben .ai-card {
    text-align: center;
    padding: 1.5rem 1rem;
    transition: transform .3s ease;
}

.ai-ben .ai-card:hover {
    transform: translateY(-5px);
}

.ai-ben img {
    width: 72px;
    height: 72px;
}

.ai-ben h3 {
    font-size: 1.15rem;
    margin: .75rem 0 .35rem;
}

.ai-ben p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.4;
    color: var(--ai-ink-3);
}


/* CTA finale */

.ai-cta {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
}

.ai-cta img {
    width: min(260px, 60vw);
    height: auto;
    justify-self: center;
}

.ai-cta p {
    color: var(--ai-ink-2);
    margin: .5rem 0 1.25rem;
}

.ai-cta-alt {
    font-size: .95rem;
    margin-top: 1rem !important;
}

.ai-cta-alt a {
    color: var(--ai-purple);
    font-weight: 700;
    text-decoration: underline;
}

@media (min-width: 860px) {
    .ai-cta {
        grid-template-columns: auto 1fr;
        text-align: left;
        padding: 2rem 2.5rem;
    }
}


/* Footer */

.ai-footer {
    color: var(--ai-ink-3);
    padding-top: 3rem;
}

.ai-foot-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.25rem;
}

.ai-foot-logos .l {
    background: #fff;
    border-radius: 16px;
    padding: .6rem 1.1rem;
    box-shadow: 0 4px 14px rgba(140, 110, 200, .12);
    display: flex;
    align-items: center;
    height: 64px;
    transition: transform .3s ease;
}

.ai-foot-logos .l:hover {
    transform: translateY(-3px);
}

.ai-foot-logos img {
    height: 42px;
    width: auto;
}

.ai-footer .footer-link {
    color: var(--ai-purple);
}

.ai-footer .footer-link:hover {
    color: var(--ai-pink);
}


/* Modal con tocco SgolIA */

.ai-page .modal-content {
    border-color: var(--ai-purple);
}

.ai-page .modal-close {
    color: var(--ai-purple);
}

.ai-page .modal-content .btn {
    background: linear-gradient(120deg, var(--ai-blue), var(--ai-purple) 55%, var(--ai-pink));
}

@media (prefers-reduced-motion: reduce) {
    .ai-bubble {
        animation: none;
    }
}
