
/*================================================================================
  1. Variabili e Stili di Base
================================================================================*/

:root {
    --brand-pink: #ff006a;
    --brand-purple: #6b00eb;
    --brand-blue: #0000e9;
    --background: #ffffff;
    --foreground: #1a1a1a;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --accent: #f3f4f6;
    --light-purple-bg: #f9f5ff;
    --light-blue-bg: #f0f8ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Stile di Focus Globale per l'Accessibilità */
*:focus-visible {
    outline: 3px solid var(--brand-blue);
    outline-offset: 2px;
    border-radius: 4px;
}


/*================================================================================
  2. Layout Principale (Header, Footer, Sezioni)
================================================================================*/

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 5rem;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.header.menu-is-open {
    background-color: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border-bottom-color: transparent !important;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: clamp(4rem, 8vh, 7rem) 1.5rem;
    scroll-margin-top: 5rem; /* Altezza header */
}

.section__content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    width: 100%;
}

.footer {
    background-color: #1f2937;
    color: #9ca3af;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 10;;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer__copyright {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.footer__text {
    margin-bottom: 1rem;
}

.footer__separator {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.footer__link {
    font-size: 0.875rem;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer__link:hover {
    color: white;
}


/*================================================================================
  3. Componenti
================================================================================*/

/*-----------------------------------
  Bottoni
------------------------------------*/
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background-color: var(--brand-blue);
    color: white;
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

.btn--primary:hover {
    background-color: #0000c6;
}

.btn--white {
    background-color: white;
    color: var(--brand-purple);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn--white:hover {
    background-color: #f9fafb;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.btn--gradient {
    background: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-purple) 45%, var(--brand-blue) 100%);
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 8px 16px rgba(107, 0, 235, 0.3);
}

.btn--gradient:hover {
    box-shadow: 0 12px 24px rgba(107, 0, 235, 0.4);
}

.btn--outline {
    background: white;
    color: var(--brand-purple);
    text-decoration: none;
    border-radius: 2rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid var(--brand-purple);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--outline:hover {
    transform: translateY(-0.25rem);
    text-decoration: none;
    color: var(--brand-purple);
    border: 2px solid var(--brand-purple);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn__icon {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
}

/*-----------------------------------
  Navigazione
------------------------------------*/

.logo-container {
    height: 48px;
    width: auto;
    display: flex;
    align-items: center;
    position: relative;
    transition: transform 0.3s ease;
}
.logo-container:hover {
    transform: scale(1.05);
}

.logo-container img {
    height: 48px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo-container img:nth-child(2) {
    position: absolute;
    top: 0;
    left: 0;
}

#header .logo-container #logo-color {
    opacity: 0;
}
#header.scrolled .logo-container #logo-white {
    opacity: 0;
}
#header.scrolled .logo-container #logo-color {
    opacity: 1;
}
#header.menu-is-open .logo-container #logo-white {
    opacity: 1 !important;
}
#header.menu-is-open .logo-container #logo-color {
    opacity: 0 !important;
}


.desktop-nav {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
}

.desktop-nav__link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.desktop-nav__link:hover {
    color: white;
}

#header.scrolled .desktop-nav__link {
    color: var(--foreground);
}

.desktop-btn {
    display: none;
}
@media (min-width: 768px) {
    .desktop-btn {
        display: inline-flex;
    }
}

/*-----------------------------------
  Menu Mobile
------------------------------------*/

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    z-index: 50;
}
@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

#header.scrolled .mobile-menu-btn {
    color: var(--brand-blue);
}
#header.menu-is-open .mobile-menu-btn {
    color: white !important;
}

.hamburger-menu {
    width: 24px;
    height: 24px;
    position: relative;
}

.hamburger-menu__line {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    position: absolute;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger-menu__line:nth-child(1) { top: 5px; }
.hamburger-menu__line:nth-child(2) { top: 11px; }
.hamburger-menu__line:nth-child(3) { top: 17px; }

.hamburger-menu.active .hamburger-menu__line:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger-menu.active .hamburger-menu__line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-menu.active .hamburger-menu__line:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }


.mobile-menu {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-purple);
    padding: 2rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.mobile-menu__link {
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
}

.mobile-menu__link:hover {
    color: var(--brand-pink);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu__link--special {
    margin-top: 1rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-weight: 600;
    overflow: hidden;
}

/* Bordo gradiente per il pulsante Contatti */
.mobile-menu__link--special::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    padding: 2px;
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
}

.mobile-menu__link--special:hover {
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-blue));
    color: white;
}

.mobile-menu__link--special:hover::before {
    opacity: 0;
}


/*-----------------------------------
  Componenti Generali Sezioni
------------------------------------*/

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.title-section {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--muted-foreground);
    max-width: 42rem;
    margin: 1.5rem auto 3rem;
    line-height: 1.7;
}

.section-subtitle--light {
    color: rgba(255, 255, 255, 0.8);
}

.gradient-text {
    background: linear-gradient(135deg, var(--brand-pink) 0%, var(--brand-purple) 45%, var(--brand-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title-underline {
    width: 6rem;
    height: 0.25rem;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-blue));
    margin: 1.5rem auto 0;
    border-radius: 0.125rem;
}

.section-cta {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/*-----------------------------------
  Hero Section
------------------------------------*/
.hero {
    text-align: center;
    color: white;
    overflow: hidden;
    align-items: flex-start;
    padding: clamp(10rem, 25vh, 22rem) 1.5rem 4rem;
    position: relative; /* Added for canvas positioning */
    /* Removed background-color and background-image as canvas will handle background */
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero__title-highlight {
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__action {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.hero__canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Ensure it's behind content */
    overflow: hidden; /* Prevent canvas overflow */
}

/*-----------------------------------
  Feature Cards
------------------------------------*/

.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .feature-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.5rem);
}

.feature-card--pink {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.9), rgba(253, 242, 248, 0.9));
    border-color: rgba(251, 207, 232, 0.8);
}
.feature-card--purple {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.9), rgba(250, 245, 255, 0.9));
    border-color: rgba(196, 181, 253, 0.8);
}
.feature-card--blue {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.9));
    border-color: rgba(191, 219, 254, 0.8);
}

.feature-card__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
}
.feature-card__icon--pink { color: var(--brand-pink); }
.feature-card__icon--purple { color: var(--brand-purple); }
.feature-card__icon--blue { color: var(--brand-blue); }

.feature-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.feature-card__description {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

/*-----------------------------------
  Timeline
------------------------------------*/

.timeline-steps-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.timeline-content-right {
    width: 50%;
    padding-right: 2rem;
    text-align: right;
}

.timeline-content-left {
    width: 50%;
    padding-left: 2rem;
}

.timeline-dot {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}
.dot-step-1 { background-color: #ff006a; }
.dot-step-2 { background-image: linear-gradient(135deg, #ff006a, #b300ff); }
.dot-step-3 { background-image: linear-gradient(135deg, #6b00eb, #4e40ee); }
.dot-step-4 { background-image: linear-gradient(135deg, #4e40ee, #0000e9); }
.dot-step-5 { background-color: #0000e9; }
.dot-step-6 { background-color: #3e22b0; }


.timeline-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-step-description {
    font-size: 1.125rem;
    line-height: 1.6;
}

.timeline-content-mobile {
    display: none;
}

.timeline-footer {
    text-align: center;
    margin-top: 2rem;
}

.timeline-footer-text {
    display: inline-block;
    background: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .timeline-content-right,
    .timeline-content-left {
        display: none;
    }
    .timeline-content-mobile {
        display: block;
        margin-left: 2rem;
    }
}

/*-----------------------------------
  Contact
------------------------------------*/
.contact-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 3rem auto 0;
}

@media (min-width: 768px) {
    .contact-options {
        flex-direction: row;
        gap: 2rem;
    }
    .contact-options .btn {
        flex: 1;
    }
}

.contact-btn {
    width: 100%;
}

/*-----------------------------------
  Misc
------------------------------------*/
.decorative-dots {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    animation: bounce 2s infinite;
}
.dot-1 { background-color: var(--brand-pink); }
.dot-2 { background-color: var(--brand-purple); animation-delay: 0.5s; }
.dot-3 { background-color: var(--brand-blue); animation-delay: 1s; }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.section-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.80;
    pointer-events: none;
    background: #fff;
    background-blend-mode: overlay;
}

/*================================================================================
  4. Sfondo Sezioni con Linea Animata
================================================================================*/

.section--radial-with-line-pulse {
    background: radial-gradient(ellipse at 20% 20%, rgba(255, 0, 106, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(107, 0, 235, 0.04) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(0, 0, 233, 0.03) 0%, transparent 60%),
                #ffffff;
    position: relative;
}

.section--radial-with-line-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        var(--brand-pink) 0%,
        var(--brand-purple) 25%,
        var(--brand-blue) 50%,
        var(--brand-purple) 75%,
        var(--brand-pink) 100%);
    animation: pulseLine 3.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(107, 0, 235, 0.5);
}

.section--radial-with-line-pulse .section-bg-pattern {
    background: transparent !important;
}

/*================================================================================
  5. Animazioni di Ingresso
================================================================================*/

/* Stato iniziale - elementi nascosti */
.animate-fade-up .hero__title,
.animate-fade-up .title-hero,
.animate-fade-up .title-section,
.animate-fade-up .section-subtitle,
.animate-fade-up .hero__action,
.animate-fade-up .two-column-layout__sidebar h2,
.animate-fade-up .two-column-layout__content p,
.animate-fade-up .section-header,
.animate-fade-up .section-header + .section-subtitle,
.animate-fade-up .section-header ~ .section-subtitle {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Stato animato - quando la sezione è visibile */
.animate-fade-up.is-visible .hero__title,
.animate-fade-up.is-visible .title-hero,
.animate-fade-up.is-visible .title-section,
.animate-fade-up.is-visible .section-subtitle,
.animate-fade-up.is-visible .hero__action,
.animate-fade-up.is-visible .two-column-layout__sidebar h2,
.animate-fade-up.is-visible .two-column-layout__content p,
.animate-fade-up.is-visible .section-header,
.animate-fade-up.is-visible .section-header + .section-subtitle,
.animate-fade-up.is-visible .section-header ~ .section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Delay sequenziale */
.animate-fade-up.is-visible .hero__title,
.animate-fade-up.is-visible .title-hero { transition-delay: 0s; }

.animate-fade-up.is-visible .title-section,
.animate-fade-up.is-visible .two-column-layout__sidebar h2 { transition-delay: 0.1s; }

.animate-fade-up.is-visible .section-subtitle,
.animate-fade-up.is-visible .two-column-layout__content p { transition-delay: 0.2s; }
.animate-fade-up.is-visible .two-column-layout__content p:nth-child(2) { transition-delay: 0.35s; }

.animate-fade-up.is-visible .hero__action { transition-delay: 0.4s; }

/* Animazione per section-header (titolo + sottotitolo in sequenza) */
.animate-fade-up.is-visible .section-header .title-section { transition-delay: 0.1s; }
.animate-fade-up.is-visible .section-header + .section-subtitle { transition-delay: 0.25s; }

/*================================================================================
  6. Animazioni Card e Pulsanti
================================================================================*/

/* Stato iniziale card */
.animate-cards .feature-card,
.animate-cards .project-card,
.animate-cards .section-cta {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Card visibili */
.animate-cards.is-visible .feature-card,
.animate-cards.is-visible .project-card,
.animate-cards.is-visible .section-cta {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger timing per card */
.animate-cards.is-visible .feature-card:nth-child(1),
.animate-cards.is-visible .project-card:nth-child(1) { transition-delay: 0.4s; }
.animate-cards.is-visible .feature-card:nth-child(2),
.animate-cards.is-visible .project-card:nth-child(2) { transition-delay: 0.55s; }
.animate-cards.is-visible .feature-card:nth-child(3),
.animate-cards.is-visible .project-card:nth-child(3) { transition-delay: 0.7s; }
.animate-cards.is-visible .feature-card:nth-child(4),
.animate-cards.is-visible .project-card:nth-child(4) { transition-delay: 0.85s; }
.animate-cards.is-visible .feature-card:nth-child(5),
.animate-cards.is-visible .project-card:nth-child(5) { transition-delay: 1s; }
.animate-cards.is-visible .feature-card:nth-child(6),
.animate-cards.is-visible .project-card:nth-child(6) { transition-delay: 1.15s; }

/* Pulsante CTA */
.animate-cards.is-visible .section-cta {
    transition-delay: 0.9s;
}

/*================================================================================
  6. Animazione Timeline - Alternating Slide
================================================================================*/

.animate-timeline .timeline-item {
    opacity: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Desktop: alternati da dx e sx */
@media (min-width: 769px) {
    .animate-timeline .timeline-item:nth-child(odd) { transform: translateX(-50px); }
    .animate-timeline .timeline-item:nth-child(even) { transform: translateX(50px); }
}

/* Mobile: tutti dal basso */
@media (max-width: 768px) {
    .animate-timeline .timeline-item { transform: translateY(30px); }
}

.animate-timeline.is-visible .timeline-item:nth-child(1) { transition-delay: 0.1s; }
.animate-timeline.is-visible .timeline-item:nth-child(2) { transition-delay: 0.25s; }
.animate-timeline.is-visible .timeline-item:nth-child(3) { transition-delay: 0.4s; }
.animate-timeline.is-visible .timeline-item:nth-child(4) { transition-delay: 0.55s; }
.animate-timeline.is-visible .timeline-item:nth-child(5) { transition-delay: 0.7s; }
.animate-timeline.is-visible .timeline-item:nth-child(6) { transition-delay: 0.85s; }

.animate-timeline.is-visible .timeline-item {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

@keyframes pulseLine {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 0 5px rgba(107, 0, 235, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(107, 0, 235, 0.6), 0 0 40px rgba(255, 0, 106, 0.3);
    }
}

/*================================================================================
   7. Animazione Pulsante CTA - Attention Bounce
================================================================================*/

/* Bounce automatico dopo 0.6s + hover identico a btn--outline */
.btn-attention-bounce {
    position: relative;
    animation: attentionBounce 3s ease-in-out infinite;
    animation-delay: 0.6s;
}

@keyframes attentionBounce {
    0%, 100%, 75% { bottom: 0; }
    80% { bottom: 6px; }
    85% { bottom: 0; }
    90% { bottom: 3px; }
    95% { bottom: 0; }
}

/* Hover identico al pulsante .btn--outline */
.btn-attention-bounce:hover {
    animation-play-state: paused;
    transform: translateY(-0.25rem);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/*================================================================================
   8. Pulsante Contatti Navbar - Outline con bordo gradiente
================================================================================*/

.btn-navbar--outline {
    position: relative;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.3rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    z-index: 1;
}

/* Pseudo-elemento per il bordo gradiente con angoli arrotondati */
.btn-navbar--outline::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 0.5rem;
    padding: 2px;
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.btn-navbar--outline:hover {
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-blue));
    color: white;
    transform: translateY(-2px);
}

.btn-navbar--outline:hover::before {
    opacity: 0;
}

/* Quando la navbar è scrolled, sfondo come l'header */
.header.scrolled .btn-navbar--outline {
    color: var(--brand-blue);
    background-color: rgba(255, 255, 255, 0.95);
}

.header.scrolled .btn-navbar--outline:hover {
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple), var(--brand-blue));
    color: white;
}

/*================================================================================
   9. Page Hero (per pagine interne come R&D)
================================================================================*/

.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 100%;
    padding: clamp(6rem, 12vh, 8rem) 1.5rem 3rem;
    color: white;
    overflow: hidden;
}

.page-hero .hero__canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.page-hero .section__content-wrapper {
    text-align: left;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.page-hero .title-hero {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.page-hero .section-subtitle {
    margin: 0;
    max-width: 600px;
}

/* Banner viola a tutta larghezza */
.page-banner {
    background-color: var(--brand-purple);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
}

/* Sezione compatta per pagine interne (non full-height) */
.section--compact {
    min-height: auto;
    padding: 4rem 1.5rem;
}

/* Sfondo radiale sottile (quasi bianco) per pagine interne */
.section--radial-gradient {
    background: radial-gradient(ellipse at 20% 20%, rgba(255, 0, 106, 0.015) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(107, 0, 235, 0.015) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(0, 0, 233, 0.01) 0%, transparent 60%),
                #ffffff;
}

.page-banner__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
}

/* Card per progetti R&D */
.project-card {
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-0.5rem);
}

.project-card--pink {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.9), rgba(253, 242, 248, 0.9));
    border-color: rgba(251, 207, 232, 0.8);
}

.project-card--purple {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.9), rgba(250, 245, 255, 0.9));
    border-color: rgba(196, 181, 253, 0.8);
}

.project-card--blue {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9), rgba(239, 246, 255, 0.9));
    border-color: rgba(191, 219, 254, 0.8);
}

.project-card__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
}

.project-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.project-card__description {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Grid per card progetti */
.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .project-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Layout a due colonne per testo */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr 2fr;
    }
}

.two-column-layout__sidebar h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.two-column-layout__content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .two-column-layout__content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.two-column-layout__content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
}

/* Active nav link */
.nav-link-active {
    position: relative;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-pink), var(--brand-purple));
}

/* Sezione contact con gradiente */
.section--contact-gradient {
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.5) 0%, rgba(233, 213, 255, 0.5) 100%);
}
