/* =====================================================
   PGASSIST · Home pubblica
   Qui stanno SOLO gli stili specifici della home.
   Temi chiaro/scuro, reset, logo, pulsanti (.btn), icone, badge ecc.
   sono condivisi con l'area riservata e stanno in pgassist.css.
===================================================== */

:root {
    --header-h: 72px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

.container {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

/* Titoletto sopra i titoli: più grande che nell'area riservata */
.home .eyebrow {
    font-size: 14px;
    margin-bottom: 20px;
}

/* =========================
   HEADER
========================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background .25s;
}

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

.site-header .logo {
    font-size: 25px;
}

.site-header .logo .icon {
    width: 34px;
    height: 40px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-soft);
    font-size: 15px;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;
    min-height: 100svh;
    max-height: 900px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: calc(var(--header-h) + 40px) 0 80px;

    background:
        radial-gradient(circle at 80% 30%, rgba(var(--primary-rgb), .20), transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(var(--primary-rgb), .08), transparent 30%),
        var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .6;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    -webkit-mask-image: radial-gradient(circle at 60% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(circle at 60% 40%, #000 20%, transparent 75%);
}

.hero-content {
    position: relative;
    max-width: 780px;
}

:where(.home) h1 {
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    margin-bottom: 28px;
}

:where(.home) h1 span {
    color: var(--primary);
}

.hero-text {
    color: var(--muted);
    font-size: clamp(17px, 2.2vw, 20px);
    max-width: 650px;
    margin-bottom: 38px;
}

.buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================
   SEZIONI
========================= */

:where(.home) section {
    padding: 110px 0;
}

.section-header {
    max-width: 680px;
    margin-bottom: 55px;
}

.section-header h2 {
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.section-header p {
    color: var(--muted);
    font-size: 18px;
}

/* Servizi */

.services {
    background: var(--bg-alt);
}

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

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--primary-rgb), .4);
    box-shadow: var(--shadow);
}

.icon-badge {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary-light);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 21px;
    margin-bottom: 13px;
}

.service-card p {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 20px;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    color: var(--text-soft);
    font-size: 14px;
    padding: 6px 0;
}

.service-card li::before,
.check-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    margin-right: 10px;
}

/* Aziende */

.business {
    background: var(--bg);
}

.business-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.business h2 {
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 25px;
}

.business p {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 20px;
}

.check-list {
    list-style: none;
    margin-top: 28px;
}

.check-list li {
    margin: 13px 0;
    color: var(--text-soft);
}

.business-box {
    padding: 45px;
    background: linear-gradient(145deg, var(--box-grad-a), var(--box-grad-b));
    border: 1px solid var(--border);
    border-radius: 20px;
}

.business-box .quote {
    font-size: clamp(21px, 3vw, 25px);
    line-height: 1.35;
    font-weight: 600;
    margin-bottom: 25px;
}

.business-box small {
    color: var(--muted);
}

/* Assistenza remota */

.remote {
    background: var(--bg-alt);
}

.remote-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 55px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 50%, rgba(var(--primary-rgb), .18), transparent 35%),
        var(--card);
    border: 1px solid var(--border);
}

.remote-box h2 {
    font-size: clamp(28px, 4vw, 35px);
    margin-bottom: 12px;
}

.remote-box p {
    color: var(--muted);
    max-width: 650px;
}

.remote-box .btn {
    flex-shrink: 0;
}

/* Sviluppo */

.development {
    background: var(--bg);
}

.development-content {
    max-width: 800px;
}

.development h2 {
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.development p {
    color: var(--muted);
    font-size: 18px;
    margin-bottom: 28px;
}

/* Contatti */

.contact {
    padding: 100px 0;
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(var(--primary-rgb), .15), transparent 45%),
        var(--bg-alt);
}

.contact h2 {
    font-size: clamp(32px, 5vw, 58px);
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.contact p {
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: 18px;
}

/* Footer */

:where(.home) footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    background: var(--bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

footer .logo {
    font-size: 20px;
}

footer .logo .icon {
    width: 26px;
    height: 31px;
}

footer p {
    color: var(--footer-text);
    font-size: 13px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 960px) {

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

    .nav-wrap {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        display: none;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }

    .nav-wrap.open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-links a {
        font-size: 17px;
        padding: 13px 4px;
        border-bottom: 1px solid var(--border);
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-actions .btn {
        width: 100%;
        padding: 13px 18px;
        font-size: 15px;
    }

    .header-tools {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

@media (min-width: 961px) {
    .header-tools {
        display: flex;
        align-items: center;
        gap: 10px;
        order: 3;
    }

    .header-tools .menu-toggle {
        display: none;
    }

    .nav-wrap {
        order: 2;
        margin-left: auto;
    }
}

@media (max-width: 850px) {

    :where(.home) section {
        padding: 80px 0;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .business-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .remote-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 35px;
        gap: 28px;
    }
}

@media (max-width: 500px) {

    .container {
        width: calc(100% - 28px);
    }

    .site-header .logo {
        font-size: 22px;
    }

    .site-header .logo .icon {
        width: 28px;
        height: 33px;
    }

    .hero {
        max-height: none;
    }

    .hero .btn,
    .contact .btn,
    .remote-box .btn,
    .development .btn {
        width: 100%;
    }

    .business-box,
    .service-card {
        padding: 26px;
    }

    .remote-box {
        padding: 28px 24px;
    }

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