:root {
    --ink: #071c3d;
    --ink-soft: #183761;
    --steel: #59606a;
    --muted: #717a86;
    --line: #dce2e8;
    --surface: #ffffff;
    --surface-alt: #f4f7fa;
    --accent: #1f6aa5;
    --silver: #8a8d91;
    --shadow: 0 20px 50px rgba(7, 28, 61, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
}

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

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

.site-header {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(220, 226, 232, 0.9);
    display: flex;
    gap: 2rem;
    height: 84px;
    justify-content: space-between;
    padding: 0 5vw;
    position: sticky;
    top: 0;
    z-index: 20;
}

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

.site-nav {
    align-items: center;
    display: flex;
    gap: 1.35rem;
    font-size: 0.86rem;
    font-weight: 750;
    text-transform: uppercase;
}

.site-nav a {
    color: var(--steel);
    padding: 0.4rem 0;
    position: relative;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--ink);
}

.site-nav a::after {
    background: var(--accent);
    bottom: -0.2rem;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
    width: 100%;
}

.site-nav a.active::after,
.site-nav a:hover::after {
    transform: scaleX(1);
}

.nav-toggle,
.nav-toggle-button {
    display: none;
}

.section {
    padding: 5.5rem 5vw;
}

.section-inner {
    margin: 0 auto;
    max-width: 1180px;
}

.section-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    line-height: 1.08;
    margin: 0 0 1rem;
}

.section-lead {
    color: var(--steel);
    font-size: 1.1rem;
    margin: 0;
    max-width: 760px;
}

.hero {
    background: linear-gradient(115deg, #071c3d 0%, #183f68 55%, #f4f7fa 55.2%, #ffffff 100%);
    color: #ffffff;
    min-height: calc(100vh - 84px);
    overflow: hidden;
    padding: 5rem 5vw;
}

.hero-grid {
    align-items: center;
    display: grid;
    gap: 4rem;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.9fr);
    margin: 0 auto;
    max-width: 1180px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    color: #b9d8f2;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.55rem, 5.2vw, 4.6rem);
    line-height: 1;
    margin: 0 0 1.4rem;
}

.hero p {
    color: #d8e5f0;
    font-size: clamp(1.04rem, 1.5vw, 1.18rem);
    margin: 0;
    max-width: 690px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

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

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

.button-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.hero-panel {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    color: var(--ink);
    padding: 2rem;
}

.hero-logo {
    background: #ffffff;
    border: 1px solid var(--line);
    padding: 1.25rem;
}

.hero-product-logo {
    border-bottom: 1px solid var(--line);
    margin-top: 1rem;
    padding: 0.85rem 0 1rem;
}

.hero-product-logo img {
    height: 64px;
    object-fit: contain;
    object-position: left center;
    opacity: 0.9;
    width: auto;
}

.signal-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1rem;
}

.signal {
    border: 1px solid var(--line);
    padding: 1rem;
}

.signal strong {
    display: block;
    font-size: 1.3rem;
    line-height: 1;
}

.signal span {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.page-hero {
    background: linear-gradient(135deg, #071c3d, #173d66);
    color: #ffffff;
    padding: 5.5rem 5vw;
}

.page-hero h1 {
    font-size: clamp(2.35rem, 4.4vw, 4.2rem);
    line-height: 1.05;
    margin: 0 0 1rem;
    max-width: 900px;
}

.page-hero p {
    color: #d8e5f0;
    font-size: 1.14rem;
    margin: 0;
    max-width: 760px;
}

.intro-grid,
.contact-grid,
.split-cta {
    display: grid;
    gap: 3rem;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.intro-card {
    background: var(--surface-alt);
    border-left: 4px solid var(--accent);
    margin-top: 2rem;
    padding: 2rem;
}

.intro-card strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1.18;
}

.intro-card p {
    color: var(--steel);
    margin: 0.8rem 0 0;
}

.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
}

.service-card,
.product-card,
.case-card,
.contact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.5rem;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.service-card:hover,
.product-card:hover,
.case-card:hover {
    border-color: rgba(31, 106, 165, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.service-card h2,
.product-card h2,
.case-card h2 {
    font-size: 1.22rem;
    margin: 0 0 0.65rem;
}

.service-card p,
.product-card p,
.case-card p {
    color: var(--steel);
    margin: 0 0 1rem;
}

.product-brand {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.product-brand img {
    height: 56px;
    object-fit: contain;
    object-position: left center;
    max-width: 100%;
    width: auto;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
}

.tag-list li {
    background: var(--surface-alt);
    color: var(--ink-soft);
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.35rem 0.55rem;
}

.collaboration-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 2rem;
}

.collaboration-card {
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 1.4rem;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.collaboration-card:hover {
    border-color: rgba(31, 106, 165, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.collaboration-logo {
    align-items: center;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    display: flex;
    height: 104px;
    justify-content: center;
    margin-bottom: 1.1rem;
    padding: 1.1rem;
}

.dark-logo-card .collaboration-logo {
    background: #1f252b;
}

.collaboration-logo img {
    max-height: 64px;
    object-fit: contain;
    width: auto;
}

.compact-logo img {
    max-height: 78px;
}

.wide-logo img {
    max-height: 72px;
    width: 100%;
}

.collaboration-card h2 {
    font-size: 1.12rem;
    margin: 0 0 0.65rem;
}

.collaboration-card p {
    color: var(--steel);
    margin: 0;
}

.band {
    background: var(--surface-alt);
}

.process {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(7, 1fr);
}

.process-step {
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    min-height: 170px;
    padding: 1.1rem;
}

.process-step span {
    color: var(--silver);
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.process-step strong {
    display: block;
    line-height: 1.2;
}

.process-step p {
    color: var(--steel);
    font-size: 0.9rem;
    margin: 0.65rem 0 0;
}

.tech-cloud,
.sector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.tech-cloud span,
.sector-grid span {
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-weight: 750;
    padding: 0.65rem 0.9rem;
}

.quick-links {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, 1fr);
}

.quick-links a {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 800;
    padding: 1rem;
}

.contact-card {
    box-shadow: var(--shadow);
}

.contact-list {
    display: grid;
    gap: 0.9rem;
    margin: 0;
}

.contact-list div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.9rem;
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 0.25rem 0 0;
}

.site-footer {
    background: var(--ink);
    color: #dbe6ef;
    padding: 2.5rem 5vw;
}

.footer-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
}

.footer-inner strong {
    color: #ffffff;
}

.footer-inner p {
    margin: 0.25rem 0 0;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "Si e' verificato un errore.";
}

@media (max-width: 1080px) {
    .hero {
        background: linear-gradient(135deg, #071c3d, #173d66);
    }

    .hero-grid,
    .intro-grid,
    .contact-grid,
    .split-cta {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 760px) {
    .site-header {
        height: 74px;
        padding: 0 1rem;
    }

    .brand img {
        height: 48px;
    }

    .nav-toggle-button {
        display: grid;
        gap: 5px;
        padding: 0.5rem;
    }

    .nav-toggle-button span {
        background: var(--ink);
        display: block;
        height: 2px;
        width: 24px;
    }

    .site-nav {
        align-items: flex-start;
        background: #ffffff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
        flex-direction: column;
        gap: 1rem;
        left: 0;
        padding: 1.5rem;
        position: absolute;
        right: 0;
        top: 74px;
    }

    .nav-toggle:checked ~ .site-nav {
        display: flex;
    }

    .section,
    .hero,
    .page-hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero {
        min-height: auto;
        padding-top: 4rem;
    }

    .hero-panel {
        padding: 1rem;
    }

    .card-grid,
    .collaboration-grid,
    .process,
    .signal-grid,
    .quick-links {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
