/* =================================================================
   SCANNER PAGE POLISH  (page-templates/scanner.php only)
   Loaded after scanner.css / scanner-ppc.css / awards.css and scoped
   to .scanner-page, so the other templates sharing those stylesheets
   are unaffected.

   1. Base            5. Benefits          9. Also includes
   2. Hero            6. Features grid    10. Working with data
   3. Testimonial     7. Side by sides    11. Industry tiles
   4. Sidekicks       8. Closer look      12. Reduced motion
   ================================================================= */

/* 1. BASE ---------------------------------------------------------- */
.scanner-page h1,
.scanner-page h2,
.scanner-page h3 { text-wrap: balance; }
.scanner-page p { text-wrap: pretty; }

.scanner-page :focus-visible {
    outline: 2px solid var(--highlight-darker);
    outline-offset: 3px;
}

/* Quick/Compact/Effortless cards and industry tiles become swipeable rows on mobile */
@media (max-width: 768px) {
    .scanner-page :is(.eg-grid, .features-grid) {
        display: flex !important;
        gap: 1rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        /* bleed to the screen edges; .content is 90% wide */
        margin-inline: -5.56%;
        padding: .25rem 5.56% 1rem;
        scroll-padding-inline: 5.56%;
    }
    .scanner-page :is(.eg-grid, .features-grid)::-webkit-scrollbar { display: none; }
    .scanner-page :is(.eg-grid, .features-grid) > * {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}


/* 2. HERO ---------------------------------------------------------- */
.scanner-page .hero-buttons {
    flex-wrap: wrap;
    gap: .75rem;
}

/* secondary CTA becomes a proper outline button that matches the primary */
.scanner-page .lp-hero .sec-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.25rem;
    border: 1px solid var(--black-03);
    border-radius: 100px;
    font-family: "Satoshi", sans-serif;
    font-size: .95rem;
    font-weight: 450;
    text-transform: uppercase;
    transition: border-color .25s, background-color .25s;
}
.scanner-page .lp-hero .sec-cta:hover {
    padding-bottom: .65rem;
    border-color: var(--highlight-darker);
    background-color: var(--light-green);
}

.scanner-page .hero-award {
    transition: translate .3s cubic-bezier(.22, .61, .36, 1), box-shadow .3s;
}
@media (hover: hover) {
    .scanner-page .hero-award:hover {
        translate: 0 -3px;
        box-shadow: 0 14px 28px -14px var(--black-03);
    }
}

@media (max-width: 768px) {
    /* the price CTA was hidden on phones; it's a key action, so show it */
    .scanner-page .lp-hero .sec-cta { display: inline-flex; }
}

@media (max-width: 520px) {
    /* scanner-ppc.css switches this to a grid on mobile */
    .scanner-page .hero-buttons {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }
    .scanner-page .hero-buttons > a {
        width: auto;
        justify-content: center;
        text-align: center;
    }
}


/* 3. TESTIMONIAL --------------------------------------------------- */
.scanner-page .huc-stats-content a i { transition: translate .25s; }
.scanner-page .huc-stats-content a:hover i { translate: 4px 0; }


/* 4. SIDEKICKS ----------------------------------------------------- */
@media (max-width: 640px) {
    /* icon beside the text instead of stacked: about half the height */
    .scanner-page .sidekicks {
        padding: 2.5rem 0 5rem;
        row-gap: 1.25rem;
        text-align: left;
        font-size: 1rem;
    }
    .scanner-page .sidekicks > div {
        display: grid;
        grid-template-columns: 3rem 1fr;
        align-items: center;
        gap: 1rem;
    }
    .scanner-page .sidekicks i {
        margin: 0;
        font-size: 2.25rem;
        text-align: center;
    }
}


/* 5. BENEFITS ------------------------------------------------------ */
.scanner-page .benefits-grid {
    row-gap: clamp(4rem, 8vw, 7rem);
}

.scanner-page .benefits-grid-content-pic {
    border-radius: .75rem;
    overflow: hidden;
}
.scanner-page .benefits-grid video,
.scanner-page .benefits-grid img {
    display: block;
    border-radius: .75rem;
}

@media (max-width: 640px) {
    .scanner-page .benefits-grid { row-gap: 3.5rem; }
    .scanner-page .benefits .intro { margin-bottom: 3rem; }
}


/* 6. FEATURES GRID (Quick / Compact / Effortless) ------------------ */
.scanner-page .features-grid > div > :is(video, img) {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: scale .4s cubic-bezier(.22, .61, .36, 1);
}
.scanner-page .features-grid > div {
    border-radius: .5rem;
}
@media (hover: hover) {
    .scanner-page .features-grid > div:hover > :is(video, img) { scale: 1.02; }
}

@media (max-width: 768px) {
    .scanner-page .features-grid > div > :is(video, img) { aspect-ratio: 4 / 3; }
    .scanner-page .features-grid h3 { margin-top: .9rem; }
}


/* 7. SIDE BY SIDES ------------------------------------------------- */
.scanner-page .sbs img {
    border-radius: .75rem;
}

.scanner-page .sbs-icon {
    transition: background-color .25s, color .25s;
}

.scanner-page .sbs-cta i { transition: translate .25s; }
.scanner-page .sbs-cta:hover i { translate: 3px 0; }


/* 8. CLOSER LOOK --------------------------------------------------- */
.scanner-page .closer-section {
    border-radius: 0 .5rem .5rem 0;
    transition: margin-left .25s ease, background-color .25s ease, color .2s ease;
}
.scanner-page .closer-section:focus-visible {
    outline-offset: 6px;
}

@media (max-width: 1250px) {
    /* the 4-across tab row: give it a clear active state */
    .scanner-page .closer-section {
        padding: .9rem 1rem;
        border-radius: .5rem;
        border-top: 3px solid transparent;
    }
    .scanner-page .closer-controls-active {
        background: var(--light-green);
        border-top-color: var(--highlight);
    }
}

@media (max-width: 768px) {
    /* keep the video in view while tapping through the features */
    .scanner-page .scanner-callouts {
        position: sticky;
        top: 4.5rem;
        z-index: 2;
    }

    .scanner-page .closer-controls { row-gap: .5rem; }
    .scanner-page .closer-section h3 { margin: 0; font-size: 1.1rem; }

    /* only the selected feature shows its description */
    .scanner-page .closer-section p {
        display: grid;
        max-height: 0;
        margin: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .35s ease, opacity .25s ease, margin .35s ease;
    }
    .scanner-page .closer-controls-active p {
        max-height: 12rem;
        margin-top: .4rem;
        opacity: 1;
    }
}


/* 9. ALSO INCLUDES ------------------------------------------------- */
.scanner-page .datasheet {
    transition: background-color .25s, translate .3s cubic-bezier(.22, .61, .36, 1);
}
@media (hover: hover) {
    .scanner-page .datasheet:hover { translate: 0 -3px; }
}

@media (max-width: 640px) {
    /* compact rows with the icon beside the text */
    .scanner-page .extras {
        row-gap: 1.25rem;
        place-items: stretch;
        text-align: left;
        padding: 1.75rem 1.25rem 1.25rem;
    }
    .scanner-page .extras > div {
        display: grid;
        grid-template-columns: 2.5rem 1fr;
        column-gap: .9rem;
        align-items: start;
    }
    .scanner-page .extras i {
        grid-row: span 2;
        margin: .15rem 0 0;
        font-size: 1.75rem;
        text-align: center;
    }
    .scanner-page .extras h4 { margin: 0 0 .15rem; }
    .scanner-page .extras p { margin: 0; }
}


/* 10. WORKING WITH DATA -------------------------------------------- */
.scanner-page .eg-vid {
    border-radius: .75rem;
    overflow: hidden;
}

.scanner-page .bims-name {
    transition: border-color .25s, background-color .25s;
}


/* 11. INDUSTRY TILES ----------------------------------------------- */
.scanner-page .eg-grid-tile {
    border-radius: .75rem;
    isolation: isolate;
}

/* keyboard users and touch screens can't hover, so show the list */
.scanner-page .eg-grid-tile:focus-within .eg-grid-tile-content { bottom: 0; }
.scanner-page .eg-grid-tile:focus-within .eg-grid-tile-overlay { background-color: var(--black-07); }

@media (hover: none) {
    .scanner-page .eg-grid-tile-content { bottom: 0; border-bottom: none; }
    .scanner-page .eg-grid-tile-overlay {
        background: linear-gradient(to top, rgba(3,21,48,.9) 15%, rgba(3,21,48,.35));
    }
}

@media (max-width: 768px) {
    .scanner-page .eg-grid { margin-top: 2rem; }
    .scanner-page .eg-grid > .eg-grid-tile {
        min-height: 22rem;
    }
    .scanner-page .eg-grid-tile-content { bottom: 0; border-bottom: none; }
    .scanner-page .eg-grid-tile-overlay {
        background: linear-gradient(to top, rgba(3,21,48,.92) 20%, rgba(3,21,48,.3));
    }
}

/* the existing .fade reveal staggers each tile; on a swipe row the
   off-screen ones would stay invisible, so show them straight away */
@media (max-width: 768px) {
    .scanner-page :is(.eg-grid, .features-grid) > .fade { opacity: 1; transform: none; }
}


/* 12. REDUCED MOTION ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .scanner-page .fade {
        opacity: 1 !important;
        transform: none !important;
    }
    .scanner-page *,
    .scanner-page *::before,
    .scanner-page *::after {
        transition: none !important;
        animation: none !important;
    }
}
