:root {
    --color-brand: #2c85c0;
    --color-brand-dark: #1e5d91;
    --color-accent: #566d8f;
    --color-deep: #16324f;
    --color-surface: #ffffff;
    --color-surface-muted: #eff4f7;
    --color-border: rgba(22, 50, 79, 0.12);
    --color-text: #223243;
    --color-text-soft: #5d7084;
    --color-shadow: 0 20px 60px rgba(36, 62, 95, 0.16);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --container-width: 1180px;
    --header-height: 86px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--color-text);
    background: var(--color-surface);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

main,
section {
    display: block;
}

#servizi,
#software,
#contatti {
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(calc(100% - 2rem), var(--container-width));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 30px rgba(22, 50, 79, 0.08);
}

.header-bar {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand img {
    height: 54px;
    width: auto;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.94rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brand);
}

.desktop-nav a,
.mobile-nav a {
    transition: 0.2s ease;
}

.desktop-nav a {
    padding: 1rem 1.15rem;
    border-radius: 999px;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.mobile-nav a:hover,
.mobile-nav a:focus-visible {
    color: #ffffff;
    background: var(--color-brand);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(44, 133, 192, 0.16);
    border-radius: 999px;
    background: transparent;
    color: var(--color-brand);
    cursor: pointer;
}

.menu-toggle__line {
    display: block;
    width: 1.2rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open .menu-toggle__line:nth-child(2) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle__line:nth-child(3) {
    opacity: 0;
}

.menu-toggle.is-open .menu-toggle__line:nth-child(4) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    width: min(calc(100% - 2rem), var(--container-width));
    margin: 0 auto 1rem;
    padding: 0.5rem;
    border: 1px solid rgba(44, 133, 192, 0.1);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--color-shadow);
}

.mobile-nav a {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.26), transparent 38%),
        linear-gradient(135deg, #65bec2 0%, #566d8f 100%);
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 151, 221, 0.28);
    mix-blend-mode: overlay;
}

.hero-grid {
    position: relative;
    z-index: 1;
    min-height: min(90vh, 860px);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 4.5rem 0 9rem;
}

.hero-visual img {
    width: min(100%, 60rem);
    filter: drop-shadow(0 18px 40px rgba(15, 33, 53, 0.2));
}

.hero-copy {
    max-width: 37rem;
}

.eyebrow,
.section-kicker {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.eyebrow {
    color: rgba(255, 255, 255, 0.78);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 4.4rem);
    line-height: 1.05;
}

.hero-text {
    margin: 1.5rem 0 0;
    max-width: 38rem;
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    padding: 0.9rem 1.65rem;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button--primary {
    color: var(--color-brand-dark);
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(16, 45, 74, 0.18);
}

.button--primary:hover,
.button--primary:focus-visible {
    transform: translateY(-1px);
    background: #f4fbff;
}

.hero-wave {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    color: var(--color-surface-muted);
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 110px;
}

.section {
    padding: 7rem 0;
}

.section--muted {
    background: var(--color-surface-muted);
}

.section-heading {
    max-width: 42rem;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.section-heading--wide {
    max-width: 52rem;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    color: var(--color-deep);
}

.section-heading p {
    margin: 1rem 0 0;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--color-text-soft);
}

.section-kicker {
    color: var(--color-brand);
}

.section-note {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--color-accent);
}

.services-grid,
.software-grid,
.contacts-grid {
    display: grid;
    gap: 1.5rem;
}

.services-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.contacts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-tech-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.stack-showcase {
    margin-top: 3.5rem;
    margin-bottom: 1rem;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius-lg) + 0.25rem);
    background:
        radial-gradient(circle at top right, rgba(44, 133, 192, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 247, 0.9));
    box-shadow: var(--color-shadow);
}

.stack-showcase__header {
    max-width: 44rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.stack-showcase__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--color-brand);
}

.stack-showcase__header h3 {
    margin: 0;
    font-size: 2rem;
    color: var(--color-deep);
}

.stack-showcase__header p {
    margin: 0.9rem 0 0;
    line-height: 1.8;
    color: var(--color-text-soft);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stack-item {
    padding: 1.5rem 1.25rem;
    border: 1px solid rgba(44, 133, 192, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.stack-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 4.5rem;
    margin: 0 auto 1rem;
    padding: 0.85rem 1rem;
    border-radius: 1.25rem;
}

.stack-icon img {
    display: block;
    width: 100%;
    max-width: 8.75rem;
    max-height: 2.5rem;
    margin: 0 auto;
}

.stack-icon--tailwind {
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.stack-icon--alpine {
    background: rgba(119, 193, 210, 0.12);
}

.stack-icon--laravel {
    color: #ff2d20;
    background: rgba(255, 45, 32, 0.1);
}

.stack-icon--livewire {
    background: rgba(251, 112, 169, 0.1);
}

.stack-item h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-deep);
}

.stack-item p {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-soft);
}

.stack-followup {
    margin-top: 2rem;
}

.stack-followup__title {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-deep);
}

.stack-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 36rem;
    margin: 0 auto;
}

.stack-icon--vue {
    background: rgba(65, 184, 131, 0.1);
}

.stack-icon--nuxt {
    background: rgba(0, 220, 130, 0.1);
}

.stack-icon--vue img,
.stack-icon--nuxt img {
    max-width: 3.25rem;
    max-height: 3.25rem;
}

.stack-showcase--services {
    margin-bottom: 0;
}

.service-tech-card {
    padding: 1.5rem 1.25rem;
    border: 1px solid rgba(44, 133, 192, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.service-tech-card:nth-child(-n + 3) {
    grid-column: span 2;
}

.service-tech-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.service-tech-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.service-tech-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 4.75rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    border-radius: 1.25rem;
}

.service-tech-logo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 2.4rem;
    margin: 0 auto;
    object-fit: contain;
}

.service-tech-logo--veeam {
    background: rgba(0, 209, 95, 0.14);
}

.service-tech-logo--ubiquiti {
    background: rgba(33, 36, 39, 0.08);
}

.service-tech-logo--synology {
    background: rgba(100, 116, 139, 0.14);
}

.service-tech-logo--vmware {
    background: rgba(96, 214, 255, 0.16);
}

.service-tech-logo--proxmox {
    background: rgba(249, 115, 22, 0.16);
}

.service-tech-logo--veeam img {
    max-height: 2rem;
}

.service-tech-logo--ubiquiti img {
    max-height: 2.9rem;
}

.service-tech-logo--synology img {
    max-height: 3.5rem;
}

.service-tech-logo--vmware img {
    max-height: 2rem;
}

.service-tech-logo--proxmox img {
    max-height: 1.65rem;
}

.service-tech-card h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--color-deep);
}

.service-tech-card p {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-soft);
}

.service-card,
.software-card,
.contact-card {
    height: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--color-shadow);
}

.service-card {
    padding: 2rem 1.5rem;
    text-align: center;
}

.service-icon {
    display: block;
    width: 3.3rem;
    height: 3.3rem;
    margin-bottom: 1.3rem;
    color: var(--color-brand);
    margin-inline: auto;
}

.service-card h3,
.software-card h3,
.contact-label {
    margin: 0;
    color: var(--color-deep);
}

.service-card h3 {
    font-size: 1rem;
    line-height: 1.5;
}

.service-card p,
.software-card p,
.contact-card p,
.contact-card a {
    margin: 0.9rem 0 0;
    line-height: 1.8;
    color: var(--color-text-soft);
}

.software-card {
    padding: 2rem;
    background: #ffffff;
}

.software-card h3 {
    font-size: 1.45rem;
}

.contact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 14rem;
    padding: 2rem;
    text-align: center;
    background: #ffffff;
}

.contact-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.contact-card a:hover,
.contact-card a:focus-visible {
    color: var(--color-brand);
}

.site-footer {
    border-top: 10px solid #402293;
    background: var(--color-brand);
    color: #ffffff;
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
    font-size: 0.95rem;
}

.footer-bar p {
    margin: 0;
}

@media (max-width: 1080px) {
    .hero-grid,
    .services-grid,
    .software-grid,
    .service-tech-grid,
    .stack-grid,
    .contacts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-grid {
        gap: 2rem;
    }

    .service-tech-card:nth-child(-n + 3),
    .service-tech-card:nth-child(4),
    .service-tech-card:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 820px) {
    :root {
        --header-height: 78px;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        padding: 3.25rem 0 7rem;
        text-align: left;
    }

    .hero-copy {
        order: -1;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 5rem 0;
    }

    .hero-grid,
    .services-grid,
    .software-grid,
    .service-tech-grid,
    .stack-grid,
    .contacts-grid,
    .footer-bar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .software-card,
    .service-card,
    .contact-card {
        padding: 1.5rem;
    }

    .footer-bar {
        text-align: center;
    }
}
