/*
 * Pagina Smart Access / controllo accessi (front/2021/controlloaccessi.php).
 * Tutto sotto .sa e con prefisso sa-: la pagina convive con bootstrap e style.css del sito.
 * Font: "Poppins" 300-700 da fonts-landing.css, Sora solo per il titolo dell'hero.
 */
@font-face {
    font-family: "Sora";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("Sora-Bold.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;
}

.sa {
    --sa-orange: #FF5300;
    --sa-orange-dark: #E04800;
    --sa-peach-soft: #FFF3EC;
    --sa-ink: #14121F;
    --sa-ink-2: #4A4857;
    --sa-muted: #6F6D79;
    --sa-surface: #FAFAFA;
    --sa-radius-xl: 32px;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--sa-ink);
    -webkit-font-smoothing: antialiased;
}

.sa h1,
.sa h2,
.sa h3,
.sa p,
.sa ul {
    margin: 0;
    padding: 0;
}

.sa img {
    display: block;
    max-width: 100%;
    height: auto;
}

.sa b {
    font-weight: 600;
}

.sa-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.sa-section {
    padding: 56px 0;
}

.sa-display {
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.08;
    font-size: clamp(34px, 4.4vw, 56px);
    color: var(--sa-ink);
}

.sa h3 {
    font-weight: 600;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.sa-lead {
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.5;
    color: var(--sa-ink-2);
}

.sa-head {
    max-width: 780px;
    margin: 0 auto 40px;
    text-align: center;
}

.sa-head p {
    margin-top: 14px;
}

/* Bottoni pill */
.sa-btn,
.sa-btn:hover {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 14px 26px;
    font: 600 16px/1 "Poppins", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s, background .15s;
}

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

.sa-btn-primary,
.sa-btn-primary:hover {
    background: var(--sa-orange);
    color: #fff;
}

.sa-btn-primary:hover {
    background: var(--sa-orange-dark);
}

.sa-btn-dark,
.sa-btn-dark:hover {
    background: var(--sa-ink);
    color: #fff;
}

.sa-link,
.sa-link:hover {
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--sa-ink);
}

.sa-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.sa-btn:focus-visible,
.sa-link:focus-visible,
.sa-bento-side:focus-visible {
    outline: 3px solid var(--sa-ink);
    outline-offset: 3px;
}

/* ===== Hero: card arrotondata, testo a sx, foto a dx ===== */
.sa-hero {
    padding: 24px 0 40px;
}

.sa-hero-card {
    position: relative;
    border-radius: var(--sa-radius-xl);
    overflow: hidden;
    min-height: 580px;
    display: flex;
    align-items: center;
    background: #A2A8A4;
}

.sa-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 64px 0 64px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.sa-hero-copy h1 {
    font-family: "Sora", "Poppins", sans-serif;
    font-weight: 700;
    font-size: clamp(56px, 8vw, 104px);
    letter-spacing: -.045em;
    line-height: .98;
    color: var(--sa-ink);
}

.sa-tag {
    font-size: 15px;
    font-weight: 600;
    color: var(--sa-ink);
    opacity: .75;
}

.sa-hero-sub {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.sa-hero-copy .sa-lead {
    max-width: 400px;
    color: var(--sa-ink);
}

.sa-hero-copy .sa-btn {
    align-self: flex-start;
    margin-top: 8px;
}

/* Foto a destra (lettore + mano sempre interi): il bordo sinistro sfuma nel grigio del tavolo, dove sta il testo */
.sa-hero-media {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 84%;
    aspect-ratio: 1731 / 909;
}

/* Il frame ha sempre le proporzioni della foto: la linea di scansione (in coordinate della foto) resta sul lettore */
.sa-hero-frame {
    position: absolute;
    inset: 0;
}

.sa-hero-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%), linear-gradient(180deg, transparent 0%, #000 26%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, #000 22%), linear-gradient(180deg, transparent 0%, #000 26%);
    mask-composite: intersect;
}

.sa-scan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .sa-scan {
        display: none;
    }
}

/* ===== Affidati ===== */
.sa-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.sa-split-media {
    border-radius: var(--sa-radius-xl);
    overflow: hidden;
    background: var(--sa-surface);
    aspect-ratio: 1260 / 1060;
}

.sa-split-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sa-split-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.sa-split-copy .sa-display {
    font-size: clamp(34px, 3.8vw, 52px);
}

.sa-split-copy p {
    font-size: 19px;
    line-height: 1.5;
}

.sa-dots {
    list-style: none;
    display: grid;
    gap: 14px;
    padding-left: 4px !important;
    font-size: 18px;
}

.sa-dots li {
    position: relative;
    padding-left: 24px;
}

.sa-dots li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sa-ink);
}

.sa-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    margin-top: 12px;
}

.sa-split-copy .sa-btn {
    padding: 16px 30px;
}

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

.sa-bento-main {
    grid-row: 1 / 3;
    background: var(--sa-surface);
    border-radius: var(--sa-radius-xl);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sa-bento-main p {
    color: var(--sa-ink-2);
}

.sa-bento-main small {
    color: var(--sa-muted);
    font-size: 13px;
}

.sa-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto !important;
}

.sa-chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    font-size: 14px;
    font-weight: 500;
}

.sa-chip-ic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sa-peach-soft);
    color: var(--sa-orange);
    display: grid;
    place-items: center;
}

.sa-bento-side,
.sa-bento-side:hover {
    position: relative;
    background: var(--sa-surface);
    border-radius: var(--sa-radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: var(--sa-ink);
    transition: transform .15s;
}

.sa-bento-side:hover {
    transform: translateY(-2px);
}

.sa-bento-side p {
    color: var(--sa-ink-2);
    font-size: 16px;
    flex: 1;
}

.sa-bento-sky,
.sa-bento-sky:hover {
    background: #E3F4FD;
}

.sa-tag-new {
    position: absolute;
    top: 28px;
    right: 28px;
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
}

.sa-icon-bubble {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--sa-orange);
}

/* ===== Banner novità: spogliatoio (sfondo .webp in webp-overrides.css) ===== */
.sa-promo {
    padding: 24px 0 56px;
}

.sa-promo-card {
    background: #C9E9FB url("../img/Controllo_Accessi/smart_access/spogliatoio_sfondo.jpg") center / cover no-repeat;
    border-radius: var(--sa-radius-xl);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    min-height: 540px;
    position: relative;
    overflow: hidden;
}

.sa-promo-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px 40px 0;
}

.sa-promo-media img {
    width: 100%;
    max-width: 560px;
    filter: drop-shadow(0 30px 40px rgba(20, 60, 120, .28));
}

.sa-promo-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    padding: 64px 0 64px 64px;
}

.sa-pill-new {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 500;
}

.sa-pill-new b {
    font-weight: 700;
}

.sa-promo-copy .sa-display em {
    font-style: normal;
    color: var(--sa-orange);
}

.sa-promo-copy p {
    font-size: 18px;
    max-width: 460px;
}

.sa-promo-copy .sa-btn {
    align-self: flex-start;
}

/* ===== Perché scegliere ===== */
.sa-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sa-why-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.sa-why-media {
    width: 100%;
    aspect-ratio: 6 / 5;
    border-radius: var(--sa-radius-xl);
    overflow: hidden;
    background: var(--sa-surface);
    margin-bottom: 10px;
}

.sa-why-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 55%;
}

.sa-why-lilla img {
    object-position: 0 50%;
}

.sa-why-cutout {
    background: linear-gradient(180deg, #9FB7CA 0%, #A6BAC7 30%, #AEBBC1 60%, #C3C5C3 80%, #D9D3C6 100%);
}

/* Scontornato a tutta altezza, appoggiato in basso: il taglio della testa coincide col bordo della card */
.sa-why-cutout img {
    object-position: 50% 100%;
}

.sa-why-card h3 {
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 700;
    letter-spacing: -.02em;
}

.sa-why-card p {
    flex: 1;
}

.sa-why-card .sa-link {
    margin-top: 4px;
}

/* ===== Tornelli ===== */
.sa-products {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.sa-product {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sa-product-thumb {
    background: #C8C9CD;
    border-radius: var(--sa-radius-xl);
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.sa-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 60%;
    transition: transform .4s;
}

.sa-product:hover .sa-product-thumb img {
    transform: scale(1.03);
}

.sa-product-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.sa-product-head svg {
    color: var(--sa-orange);
    flex: none;
}

.sa-product p {
    color: var(--sa-ink-2);
    font-size: 16px;
}

.sa-products-cta {
    margin-top: 40px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .sa-split,
    .sa-why-grid,
    .sa-bento,
    .sa-promo-card,
    .sa-products {
        grid-template-columns: 1fr;
    }

    .sa-hero {
        padding-top: 16px;
    }

    .sa-hero-card {
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        background: none;
        border-radius: 0;
        overflow: visible;
    }

    .sa-hero-media {
        order: -1;
        position: relative;
        width: 100%;
        aspect-ratio: 4 / 3;
        border-radius: var(--sa-radius-xl);
        overflow: hidden;
        background: #A2A8A4;
    }

    .sa-hero-frame {
        inset: auto;
        top: 0;
        height: 100%;
        width: 142.8%;
        left: -40%;
    }

    .sa-hero-frame img {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sa-hero-copy {
        max-width: none;
        padding: 28px 4px 0;
        gap: 16px;
        text-align: center;
    }

    .sa-hero-copy .sa-lead {
        max-width: none;
    }

    .sa-hero-copy .sa-btn {
        align-self: center;
    }

    .sa-split {
        gap: 40px;
    }

    .sa-promo-card {
        min-height: 0;
    }

    .sa-promo-copy {
        padding: 36px 24px 8px;
    }

    .sa-promo-media {
        padding: 8px 24px 36px;
    }

    .sa-promo-media img {
        max-width: 420px;
    }

    .sa-bento {
        grid-template-rows: auto;
    }

    .sa-bento-main {
        grid-row: auto;
    }
}

@media (max-width: 560px) {
    .sa-hero-media {
        aspect-ratio: 1 / 1;
    }

    .sa-hero-frame {
        width: 190.4%;
        left: -57%;
    }

    .sa-wrap {
        padding: 0 16px;
    }

    .sa-section {
        padding: 40px 0;
    }

    .sa-bento-main {
        padding: 28px;
    }
}
