/* ==========================================================================
   Floaty — foglio di stile
   ========================================================================== */

/* Font self-hosted (OFL): Saira per i titoli, Inter per il testo, JetBrains Mono per etichette e numeri */
@font-face {
    font-family: 'Saira';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('../fonts/saira-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Saira';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('../fonts/saira-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500 600;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500 600;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Token ------------------------------------------------------------------- */
:root {
    /* Blu Floaty: il colore del logo è --brand */
    --brand: #0043c6;
    --ink: #050d24;
    --ink-2: #0a1736;
    --ink-3: #13224a;
    --paper: #f4f7fc;
    --paper-2: #e8eef9;
    --white: #ffffff;

    --text: #0a1330;
    --text-muted: #4a5573;
    --on-dark: #eef3ff;
    --on-dark-muted: #a3b0cf;
    --line: rgba(10, 19, 48, 0.12);
    --line-strong: rgba(10, 19, 48, 0.22);
    --line-dark: rgba(170, 195, 255, 0.16);

    --accent: #1f5eea;          /* pulsanti e focus, testo bianco 5.5:1 */
    --accent-hover: #174fd1;
    --accent-deep: var(--brand); /* testo blu su fondo chiaro */
    --accent-light: #8db0ff;    /* testo blu su fondo scuro */
    --accent-soft: #e2eaff;
    --on-accent: #ffffff;
    --danger: #b42318;
    --success: #127a4a;

    --font-display: 'Saira', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --container: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 76px;
    --section-y: clamp(56px, 7vw, 104px);

    --shadow-sm: 0 1px 2px rgba(10, 19, 48, 0.06);
    --shadow: 0 1px 2px rgba(10, 19, 48, 0.05), 0 18px 40px -18px rgba(10, 30, 90, 0.28);
    --shadow-lg: 0 30px 80px -24px rgba(0, 6, 30, 0.6);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

    /* Tema progetto (sovrascritto inline) */
    --p-accent: var(--accent-light);
    --p-accent-2: var(--accent);
    --p-surface: var(--ink);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.no-scroll {
    overflow: hidden;
}

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

img {
    height: auto;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.05;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.3rem, 5.2vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.015em;
}

h2 {
    font-size: clamp(1.8rem, 3.6vw, 3rem);
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    letter-spacing: -0.005em;
    line-height: 1.15;
}

p {
    margin: 0;
    text-wrap: pretty;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

main:focus {
    outline: none;
}

.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;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 0.7em 1.1em;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.2s var(--ease);
}

.skip-link:focus {
    transform: none;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* Bottoni ----------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    padding: 0.8em 1.35em;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn .icon {
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
    transform: translateX(3px);
}

.btn-sm {
    padding: 0.6em 1.1em;
    font-size: 0.9375rem;
}

.btn-lg {
    padding: 0.95em 1.6em;
    font-size: 1.0625rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -12px rgba(31, 94, 234, 0.75);
}

.btn-ghost {
    border-color: rgba(170, 195, 255, 0.34);
    color: var(--on-dark);
}

.btn-ghost:hover {
    border-color: var(--on-dark);
    background: rgba(170, 195, 255, 0.08);
}

.btn-light {
    background: var(--white);
    color: var(--brand);
}

.btn-light:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -14px rgba(0, 10, 50, 0.6);
}

.btn[disabled] {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
}

.link-arrow .icon {
    width: 1.1em;
    height: 1.1em;
    transition: transform 0.25s var(--ease);
}

.link-arrow:hover .icon {
    transform: translateX(4px);
}

.link-arrow--dark {
    color: var(--on-dark);
    text-decoration-color: var(--accent-light);
}

/* Etichette e chip -------------------------------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    margin-bottom: 1.1rem;
    color: var(--accent-deep);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    background: currentColor;
}

.eyebrow--dark {
    color: var(--accent-light);
}

.tag {
    display: inline-block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0;
}

.tag--dark {
    padding: 0.35em 0.9em;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    color: var(--on-dark);
    background: rgba(255, 255, 255, 0.05);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    padding: 0.32em 0.8em;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.chip--lg {
    padding: 0.5em 1em;
    font-size: 0.875rem;
}

.chips--dark .chip {
    border-color: var(--line-dark);
    background: rgba(255, 255, 255, 0.06);
    color: var(--on-dark);
}

/* Header ------------------------------------------------------------------ */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    color: var(--on-dark);
    transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.nav-open {
    background: rgba(5, 13, 36, 0.86);
    border-bottom-color: var(--line-dark);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    width: auto;
    height: 40px;
    transition: transform 0.4s var(--ease);
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-list {
    display: flex;
    gap: 4px;
}

.nav-list a {
    display: block;
    padding: 0.5em 0.85em;
    border-radius: 999px;
    color: var(--on-dark-muted);
    font-weight: 550;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.nav-list a:hover {
    color: var(--on-dark);
    background: rgba(255, 255, 255, 0.07);
}

/* Selettore lingua IT / EN */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
}

.lang-switch a {
    display: block;
    padding: 0.3em 0.65em;
    border-radius: 999px;
    color: var(--on-dark-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.lang-switch a:hover {
    color: var(--on-dark);
}

.lang-switch a[aria-current] {
    background: rgba(170, 195, 255, 0.18);
    color: var(--on-dark);
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded='true'] .icon-open {
    display: none;
}

.nav-toggle[aria-expanded='true'] .icon-close {
    display: block;
}

@media (max-width: 1024px) {
    .js .nav-toggle {
        display: grid;
    }

    .js .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        max-height: calc(100dvh - var(--header-h));
        padding: 16px var(--gutter) 28px;
        overflow-y: auto;
        background: rgba(5, 13, 36, 0.97);
        border-bottom: 1px solid var(--line-dark);
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s 0.25s;
    }

    .js .nav-open .site-nav {
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    }

    .js .nav-list {
        flex-direction: column;
    }

    .js .nav-list a {
        padding: 0.85em 0;
        border-bottom: 1px solid var(--line-dark);
        border-radius: 0;
        color: var(--on-dark);
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 650;
    }

    .js .nav-list a:hover {
        background: none;
        color: var(--accent-light);
    }

    .js .lang-switch {
        align-self: flex-start;
    }

    .js .site-nav .btn {
        align-self: flex-start;
        padding: 0.95em 1.6em;
        font-size: 1.0625rem;
    }

    /* Senza JavaScript il menu resta visibile e va a capo */
    html:not(.js) .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding-block: 14px;
    }

    html:not(.js) .site-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Hero (home) ------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--header-h) + clamp(24px, 4vw, 56px));
    padding-bottom: clamp(48px, 5vw, 72px);
    background:
        radial-gradient(55% 55% at 76% 36%, rgba(31, 94, 234, 0.34), transparent 70%),
        radial-gradient(40% 45% at 4% 96%, rgba(46, 197, 255, 0.12), transparent 70%),
        var(--ink);
    color: var(--on-dark);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(170, 195, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 80%);
    mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 80%);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.hero h1 {
    font-size: clamp(2.3rem, 5vw, 4.25rem);
}

.hl {
    color: var(--accent-light);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hl {
        background: linear-gradient(95deg, #a9c3ff 0%, #4d86ff 55%, #2ec5ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.hero-lead {
    max-width: 36em;
    margin-top: 1.25rem;
    color: var(--on-dark-muted);
    font-size: clamp(1rem, 1.3vw, 1.125rem);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.75rem;
}

.hero-platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 1.75rem;
    color: var(--on-dark-muted);
    font-size: 0.875rem;
}

.hero-platforms ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-platforms li {
    padding: 0.3em 0.85em;
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    color: var(--on-dark);
    font-weight: 600;
}

/* Visual: la piuma del logo che fluttua, con le app attorno */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 430px;
    aspect-ratio: 1;
    margin-inline: auto;
}

.hero-orb {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 38%, rgba(90, 145, 255, 0.6), rgba(31, 94, 234, 0.28) 45%, transparent 70%);
    filter: blur(8px);
    animation: pulse 8s ease-in-out infinite;
}

.hero-ring {
    position: absolute;
    border: 1px solid rgba(141, 176, 255, 0.2);
    border-radius: 50%;
}

.hero-ring--1 {
    inset: 6%;
}

.hero-ring--2 {
    inset: 20%;
    border-style: dashed;
    border-color: rgba(141, 176, 255, 0.16);
    animation: spin 80s linear infinite;
}

.hero-feather {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24%;
    filter: drop-shadow(0 24px 40px rgba(31, 94, 234, 0.55)) drop-shadow(0 0 28px rgba(141, 176, 255, 0.35));
    transform: translate(-50%, -54%) rotate(-3deg);
    animation: feather 9s ease-in-out infinite;
}

.hero-feather-svg {
    width: 100%;
    height: auto;
}

.float-chip {
    position: absolute;
    top: 13%;
    right: 2%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(141, 176, 255, 0.35);
    border-radius: 999px;
    background: rgba(31, 94, 234, 0.24);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--on-dark);
    font-size: 0.8125rem;
    font-weight: 650;
    animation: bob 6.5s ease-in-out infinite;
    animation-delay: -2s;
}

.float-chip .icon {
    width: 1.05em;
    height: 1.05em;
    color: var(--accent-light);
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 30px 10px 10px;
    border: 1px solid var(--line-dark);
    border-radius: 20px;
    background: rgba(10, 23, 54, 0.74);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    animation: bob 7s ease-in-out infinite;
}

.float-card img {
    width: 52px;
    height: 52px;
    border-radius: 13px;
}

.float-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.float-card span {
    display: block;
    color: var(--on-dark-muted);
    font-size: 0.8125rem;
}

.float-card::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--p-accent);
    box-shadow: 0 0 12px var(--p-accent);
}

.float-card--1 { top: 4%; left: -4%; animation-delay: -1s; }
.float-card--2 { top: 44%; right: -2%; animation-duration: 8s; animation-delay: -3s; }
.float-card--3 { bottom: 8%; left: 4%; animation-duration: 7.5s; animation-delay: -5s; }

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

@keyframes feather {
    0%, 100% { transform: translate(-50%, -54%) rotate(-3deg); }
    50% { transform: translate(-50%, -61%) rotate(3deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Sezioni ----------------------------------------------------------------- */
.section {
    padding-block: var(--section-y);
}

.section--tight {
    padding-block: clamp(40px, 5vw, 56px);
}

.section--alt {
    background: var(--paper-2);
}

.section--dark {
    background: var(--ink);
    color: var(--on-dark);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    gap: 24px clamp(32px, 6vw, 96px);
    margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head h2 {
    max-width: 14em;
}

.section-head--single {
    display: block;
}

.section-lead {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.section--dark .section-lead {
    color: var(--on-dark-muted);
}

/* Servizi */
.services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(24px, 3.4vw, 40px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.service-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--accent-soft);
    color: var(--accent-deep);
}

.service-icon .icon {
    width: 26px;
    height: 26px;
}

.service-num {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.service-card p {
    flex-grow: 1;
    color: var(--text-muted);
}

.service-card .chips {
    margin-top: 8px;
}

.service-card .chip {
    background: var(--paper);
}

/* Progetti: vetrine alternate */
.showcases {
    display: grid;
    gap: clamp(56px, 7vw, 88px);
}

.showcase {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.showcase:nth-child(even) {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.showcase:nth-child(even) .showcase-media {
    order: 2;
}

.showcase-media {
    display: block;
    border-radius: var(--radius-lg);
}

.showcase-body h3 {
    margin-top: 0.6rem;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.showcase-body h3 a {
    text-decoration: none;
}

.showcase-body h3 a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
}

.showcase-tagline {
    margin: 0.9rem 0 0.8rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.showcase-body > p:not(.showcase-tagline):not(.tag) {
    color: var(--text-muted);
}

.showcase-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin-top: 1.8rem;
}

/* Stage: la copertina del progetto su fondo a tema */
.stage {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 5 / 4;
    padding: clamp(20px, 4vw, 44px);
    border-radius: var(--radius-lg);
    background-color: var(--p-surface);
    background-image:
        radial-gradient(70% 60% at 12% 8%, color-mix(in srgb, var(--p-accent) 38%, transparent), transparent 70%),
        radial-gradient(60% 60% at 95% 100%, color-mix(in srgb, var(--p-accent-2) 34%, transparent), transparent 70%);
    overflow: hidden;
    isolation: isolate;
}

.stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
    mask-image: linear-gradient(180deg, #000, transparent 85%);
}

.stage-img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.6s var(--ease);
}

.stage-icon {
    position: absolute;
    right: clamp(14px, 3vw, 28px);
    bottom: clamp(14px, 3vw, 28px);
    width: clamp(56px, 8vw, 88px);
    height: auto;
    border-radius: 22%;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.14);
    animation: bob 7s ease-in-out infinite;
}

/* Copertina a tutto riquadro */
.stage--fill {
    padding: 0;
}

.stage--fill .stage-img {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    object-position: var(--fill-position, 50% 50%);
}

.stage--phone {
    aspect-ratio: 5 / 4;
    padding-bottom: 0;
    align-items: end;
}

.stage--phone .phone {
    width: min(48%, 270px);
    transform: translateY(14%) rotate(-4deg);
    transition: transform 0.6s var(--ease);
}

.stage--phone .stage-icon {
    right: auto;
    left: clamp(14px, 3vw, 28px);
    bottom: auto;
    top: clamp(14px, 3vw, 28px);
}

a:hover .stage-img {
    transform: scale(1.02);
}

a:hover .stage--phone .phone {
    transform: translateY(10%) rotate(-2deg);
}

.phone {
    padding: 7px;
    border-radius: 34px;
    background: #0b0b0f;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.phone img {
    width: 100%;
    border-radius: 28px;
}

/* Statistiche */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 1.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.stats li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats strong {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stats span {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.35;
}

/* Metodo */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: step;
}

.steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-light), rgba(170, 195, 255, 0.14) 60%);
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    background: var(--ink-2);
    color: var(--accent-light);
}

.step-icon .icon {
    width: 24px;
    height: 24px;
}

.step-num {
    color: var(--on-dark-muted);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.step p {
    color: var(--on-dark-muted);
}

/* Tecnologie */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.stack-group {
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.stack-group h3 {
    margin-bottom: 1.1rem;
    font-size: 1.25rem;
}

.stack-group .chip {
    background: var(--paper);
}

.stack-group h3 {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.stack-group h3 .icon {
    color: var(--accent-deep);
}

.stack-group--wide {
    grid-column: 1 / -1;
    border-color: rgba(0, 67, 198, 0.25);
    background: linear-gradient(120deg, var(--white) 40%, var(--accent-soft));
}

.stack-group--wide .chip {
    border-color: rgba(0, 67, 198, 0.25);
    background: var(--white);
    color: var(--brand);
}

/* AI e innovazione */
.section--frontier {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(45% 60% at 100% 0%, rgba(31, 94, 234, 0.3), transparent 70%),
        radial-gradient(40% 50% at 0% 100%, rgba(46, 197, 255, 0.12), transparent 70%),
        var(--ink);
}

.frontier {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.frontier-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(24px, 3vw, 36px);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(19, 34, 74, 0.7), rgba(10, 23, 54, 0.5));
    transition: transform 0.35s var(--ease), border-color 0.35s;
}

.frontier-card:hover {
    transform: translateY(-4px);
    border-color: rgba(141, 176, 255, 0.4);
}

.frontier-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 8px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #2ec5ff);
    color: var(--white);
    box-shadow: 0 12px 30px -10px rgba(31, 94, 234, 0.8);
}

.frontier-icon .icon {
    width: 26px;
    height: 26px;
}

.frontier-card p {
    flex-grow: 1;
    color: var(--on-dark-muted);
}

.frontier-card .link-arrow {
    margin-top: 8px;
    align-self: flex-start;
}

/* Il servizio AI è in evidenza */
.service-card:first-child {
    border-color: rgba(0, 67, 198, 0.25);
    background: linear-gradient(140deg, var(--white) 45%, var(--accent-soft));
}

.service-card:first-child .service-icon {
    background: linear-gradient(135deg, var(--brand), #2ec5ff);
    color: var(--white);
}

/* CTA --------------------------------------------------------------------- */
.cta-band {
    position: relative;
    overflow: hidden;
    padding-block: clamp(56px, 6vw, 88px);
    background:
        radial-gradient(60% 90% at 85% 20%, rgba(46, 197, 255, 0.35), transparent 70%),
        radial-gradient(50% 80% at 0% 100%, rgba(5, 13, 36, 0.45), transparent 70%),
        var(--brand);
    color: var(--white);
}

.cta-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 32px;
}

.cta-inner h2 {
    max-width: 12em;
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.cta-inner p {
    max-width: 32em;
    margin-top: 1rem;
    color: #dbe6ff;
    font-size: 1.125rem;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

.cta-mail {
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    overflow-wrap: anywhere;
}

.cta-mark {
    position: absolute;
    right: clamp(24px, 8vw, 140px);
    top: 50%;
    width: min(18vw, 220px);
    height: auto;
    color: var(--white);
    opacity: 0.18;
    transform: translateY(-50%) rotate(8deg);
    pointer-events: none;
}

@media (max-width: 900px) {
    .cta-mark {
        display: none;
    }
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
    padding-top: clamp(56px, 7vw, 88px);
    background: var(--ink);
    color: var(--on-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.footer-brand p {
    max-width: 24em;
    margin-top: 1rem;
    color: var(--on-dark-muted);
}

.footer-title {
    margin-bottom: 1rem;
    color: var(--on-dark-muted);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-col ul {
    display: grid;
    gap: 0.55rem;
}

.footer-col a {
    text-decoration: none;
    overflow-wrap: anywhere;
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: clamp(48px, 6vw, 72px);
    padding-block: 24px;
    /* filetto superiore allineato al contenuto, non al padding del container */
    background: linear-gradient(var(--line-dark), var(--line-dark)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
    color: var(--on-dark-muted);
    font-size: 0.875rem;
}

.footer-bottom a:hover {
    color: var(--on-dark);
}

/* Pagina progetto --------------------------------------------------------- */
.project-hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--header-h) + clamp(16px, 3vw, 36px));
    padding-bottom: clamp(40px, 5vw, 60px);
    background-color: var(--p-surface);
    background-image:
        radial-gradient(50% 60% at 0% 0%, color-mix(in srgb, var(--p-accent) 26%, transparent), transparent 70%),
        radial-gradient(45% 55% at 100% 100%, color-mix(in srgb, var(--p-accent-2) 22%, transparent), transparent 70%);
    color: var(--on-dark);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: clamp(16px, 3vw, 32px);
    color: var(--on-dark-muted);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--on-dark);
}

.back-link .icon {
    transition: transform 0.25s var(--ease);
}

.back-link:hover .icon {
    transform: translateX(-3px);
}

.project-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.project-id {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.25rem;
}

.project-id img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.project-hero h1 {
    font-size: clamp(2.3rem, 4.8vw, 4rem);
}

.project-lead {
    margin: 1rem 0 1.5rem;
    color: var(--on-dark-muted);
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    line-height: 1.5;
}

.project-hero .stage {
    background-image: none;
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px var(--line-dark);
}

/* l'icona è già accanto al titolo */
.project-hero .stage-icon {
    display: none;
}

/* riquadro più basso nella hero, per non allungarla */
.project-hero .stage,
.project-hero .stage--phone {
    aspect-ratio: 16 / 11;
}

.project-hero .stage--phone .phone {
    width: min(40%, 240px);
}

.stats--hero {
    margin-top: clamp(32px, 4vw, 52px);
    border-top-color: var(--line-dark);
}

.stats--hero span {
    color: var(--on-dark-muted);
    font-size: 0.9375rem;
}

.stats--hero strong {
    color: var(--p-accent);
}

.overview {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(32px, 6vw, 88px);
}

.prose p {
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.prose p + p {
    margin-top: 1.1em;
}

.prose .prose-lead {
    margin-bottom: 1.6rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.1vw, 1.65rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.fact-sheet {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.fact-sheet dl {
    display: grid;
    gap: 18px;
    margin: 0;
}

.fact-sheet dl > div + div {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.fact-sheet dt {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fact-sheet dd {
    margin: 0;
    font-weight: 600;
}

.fact-sheet .chips {
    margin-top: 8px;
}

.fact-sheet .chip {
    background: var(--paper);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(24px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--p-accent), var(--p-accent-2));
}

.feature-num {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.feature h3 {
    font-size: 1.375rem;
}

.feature p {
    color: var(--text-muted);
}

.gallery {
    display: grid;
    gap: 24px;
}

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

.gallery--phone {
    grid-template-columns: repeat(auto-fit, minmax(200px, 280px));
    justify-content: center;
    gap: clamp(24px, 5vw, 64px);
}

.gallery-item {
    margin: 0;
}

.gallery-frame {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gallery-frame img {
    width: 100%;
    transition: transform 0.6s var(--ease);
}

.gallery-item:hover .gallery-frame img {
    transform: scale(1.03);
}

.gallery-item figcaption {
    margin-top: 0.8rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 600;
}

.gallery--phone figcaption {
    text-align: center;
}

.gallery--phone .phone img {
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
}

.project-nav {
    background: var(--paper);
    border-top: 1px solid var(--line);
}

.project-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.project-nav-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    background-color: var(--p-surface);
    background-image: radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--p-accent) 30%, transparent), transparent 70%);
    color: var(--on-dark);
    text-decoration: none;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.project-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.project-nav-card img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.project-nav-card span {
    flex-grow: 1;
    min-width: 0;
}

.project-nav-card small {
    display: block;
    color: var(--on-dark-muted);
    font-size: 0.8125rem;
    font-weight: 600;
}

.project-nav-card strong {
    font-family: var(--font-display);
    font-size: 1.375rem;
    letter-spacing: -0.02em;
}

.project-nav-card--prev {
    flex-direction: row-reverse;
    text-align: right;
}

/* Pagine interne ---------------------------------------------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--header-h) + clamp(32px, 5vw, 72px));
    padding-bottom: clamp(44px, 5vw, 72px);
    background:
        radial-gradient(50% 70% at 90% 10%, rgba(31, 94, 234, 0.32), transparent 70%),
        var(--ink);
    color: var(--on-dark);
}

.page-hero h1 {
    max-width: 14em;
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.page-lead {
    max-width: 36em;
    margin-top: 1.1rem;
    color: var(--on-dark-muted);
    font-size: clamp(1rem, 1.4vw, 1.1875rem);
}

.page-hero--compact h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
}

.page-hero--full {
    display: grid;
    align-items: center;
    min-height: 70vh;
}

/* Contatti */
.section--contact {
    padding-top: clamp(40px, 5vw, 64px);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: clamp(32px, 6vw, 88px);
}

.contact-aside h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.contact-steps {
    display: grid;
    gap: 22px;
    margin: 28px 0 36px;
    counter-reset: contact;
}

.contact-steps li {
    position: relative;
    display: grid;
    gap: 2px;
    padding-left: 52px;
    counter-increment: contact;
}

.contact-steps li::before {
    content: counter(contact);
    position: absolute;
    top: -2px;
    left: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--on-dark);
    font-family: var(--font-display);
    font-weight: 700;
}

.contact-steps strong {
    font-size: 1.0625rem;
}

.contact-steps span {
    color: var(--text-muted);
}

.contact-mail {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.3s var(--ease);
}

.contact-mail:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.contact-mail span:last-child {
    min-width: 0;
}

.contact-mail small {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.contact-mail strong {
    display: block;
    overflow-wrap: anywhere;
}

.form-card {
    padding: clamp(24px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.form-card:focus {
    outline: none;
}

.form-title {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.form-note {
    margin: 0.5rem 0 1.6rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
    align-content: start;
}

.field label {
    font-size: 0.9375rem;
    font-weight: 650;
}

.field .optional {
    color: var(--text-muted);
    font-weight: 500;
}

.field input[type='text'],
.field input[type='email'],
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 0.75em 1em;
    border: 1px solid #c8d2e6;
    border-radius: 12px;
    background: #f8faff;
    font-size: 1rem;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field textarea {
    min-height: 160px;
    resize: vertical;
}

.field ::placeholder {
    color: #77829e;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: #9badd0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(31, 94, 234, 0.2);
    outline: none;
}

.select {
    position: relative;
}

.select select {
    padding-right: 2.6em;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.select::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1.1em;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.field--check {
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 12px;
}

.field--check input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--accent-deep);
    cursor: pointer;
}

.field--check label {
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

.field--check a {
    color: var(--text);
    font-weight: 600;
}

.field--check .field-error {
    grid-column: 1 / -1;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: var(--danger);
}

.field-error {
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 600;
}

.form-alert {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(180, 35, 24, 0.3);
    border-radius: 14px;
    background: #fdf0ee;
    color: var(--danger);
}

.form-alert .icon {
    margin-top: 2px;
}

.form-alert p {
    font-weight: 650;
}

.form-alert ul {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.9375rem;
}

.form-alert a {
    font-weight: 650;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-success {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding-block: 16px;
}

.form-success-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e3f4ea;
    color: var(--success);
}

.form-success-icon .icon {
    width: 28px;
    height: 28px;
}

.form-success h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.form-success p {
    max-width: 32em;
    color: var(--text-muted);
}

/* Privacy */
.legal {
    max-width: calc(760px + var(--gutter) * 2);
}

.legal h2 {
    margin: 2.4rem 0 0.8rem;
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
}

.legal h2:first-child {
    margin-top: 0;
}

.legal p {
    color: var(--text-muted);
}

.legal a {
    color: var(--text);
    font-weight: 600;
}

/* 404 */
.not-found {
    display: grid;
    justify-items: start;
}

.not-found-mark {
    width: 72px;
    height: auto;
    margin-bottom: 28px;
    filter: drop-shadow(0 16px 30px rgba(31, 94, 234, 0.55));
    animation: bob 5s ease-in-out infinite;
}

/* Comparsa allo scroll ---------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1080px) {
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 48px;
    }

    .steps::before {
        display: none;
    }

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

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

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

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .showcase,
    .showcase:nth-child(even),
    .project-hero-grid,
    .overview,
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-visual {
        max-width: 440px;
    }

    .showcase:nth-child(even) .showcase-media {
        order: 0;
    }

    .section-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .fact-sheet {
        position: static;
    }
}

@media (max-width: 680px) {
    :root {
        --header-h: 66px;
    }

    body {
        font-size: 1rem;
    }

    .brand-logo {
        height: 34px;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
    }

    .float-card {
        gap: 10px;
        padding: 8px 26px 8px 8px;
        border-radius: 16px;
    }

    .float-card img {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .float-card strong {
        font-size: 0.9375rem;
    }

    .float-card span {
        font-size: 0.75rem;
    }

    .float-card--1 { left: 0; }
    .float-card--2 { right: 0; }

    .services,
    .stack-grid,
    .features,
    .gallery--wide,
    .form-row,
    .project-nav-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .steps {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 36px;
    }

    .stats {
        gap: 12px;
    }

    .stats span {
        font-size: 0.8125rem;
    }

    .stage,
    .stage--phone {
        aspect-ratio: 4 / 3.4;
    }

    .stage--phone .phone {
        width: 54%;
    }

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

    .footer-grid .footer-col:last-child {
        grid-column: 1 / -1;
    }

    .project-nav-card--prev {
        flex-direction: row;
        text-align: left;
    }

    .project-nav-card--prev .icon {
        order: -1;
    }

    .cta-actions {
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

/* Movimento ridotto ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
