/* ============================================================================
   Apicis Solutions — Mobile/Tablet overrides
   Loaded after styles.css so responsive rules are isolated here.
   ============================================================================ */

@media (max-width: 960px) {

    .topbar {
        top: 0;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 10px var(--gutter);
        background: var(--mobile-topbar-background);
        border-color: var(--outline-variant);
        box-shadow: none;
    }

    .topbar.is-floating {
        top: 10px;
        max-width: calc(100% - 2 * var(--gutter));
        margin: 0 auto;
        padding: 8px 14px;
        border-radius: 14px;
        background: rgba(2, 20, 35, 0.9);
        border-color: rgba(138, 174, 214, 0.5);
        box-shadow:
            0 12px 30px -12px rgba(0, 0, 0, 0.55),
            0 2px 8px -2px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(126, 184, 255, 0.24);
    }

    .topbar.is-floating .brand__mark {
        font-size: 1.05rem;
    }

    .topbar.is-floating .brand__text {
        max-width: 0;
        opacity: 0;
    }

    .topnav {
        display: none;
    }

    .topbar.is-floating .topnav {
        display: flex;
        max-width: min(58vw, 240px);
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar.is-floating .topnav::-webkit-scrollbar {
        display: none;
    }

    .topbar.is-floating .topnav a {
        flex: 0 0 auto;
        padding: 4px 8px;
        font-size: 0.72rem;
        white-space: nowrap;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .hero__read {
        width: 100%;
        max-width: 100%;
        padding: 16px 16px 18px;
        order: 1;
    }

    .dial-stage {
        order: 2;
    }

    .hero {
        width: 100dvw;
        min-height: 40dvh;
        height: auto;
        padding-block: var(--space-8) 0;
        overflow: visible;
        align-items: flex-start;
        z-index: 1;
    }

    .hero__hint {
        display: none;
    }

    .hero__title {
        font-size: clamp(2rem, 8.5vw, 3rem);
        max-width: 15ch;
    }

    .hero__lede {
        font-size: 1rem;
        margin: var(--space-2) 0 var(--space-3);
    }

    .hero__lede,
    .service-meta {
        display: none;
    }

    /* Semicircle dial: centered horizontally, wider than the viewport so the
       arc spills past both edges, and sunk so only ~30% of the circle's
       height peeks up from the bottom of the stage. */
    .dial-stage {
        aspect-ratio: auto;
        height: min(45vw, 270px);
        min-height: 0;
        max-width: none;
        width: 100vw;
        margin-inline: calc(50% - 50vw);
        margin-top: var(--space-1);
        margin-bottom: 0;
        overflow: hidden;
        z-index: 2;
    }

    .strip {
        position: relative;
        z-index: 3;
        margin-top: calc(-1 * var(--space-3));
        padding-block: var(--space-1) var(--space-8);
        background: var(--page-background);
        isolation: isolate;
    }

    .section-title,
    .strip__grid {
        position: relative;
        z-index: 4;
    }

    .dial {
        left: 50%;
        top: 100%;
        width: min(150vw, 900px);
        transform: translate(-50%, -30%);
        /* No heavy blue fill on mobile — a rim of fine graduation ticks
           makes it feel like a precision instrument that clicks. */
        background: var(--mobile-dial-background);
        box-shadow: var(--mobile-dial-shadow);
        border-color: var(--mobile-dial-border);
    }

    .dial::before {
        inset: 3.5%;
        background: var(--mobile-dial-inner-background);
    }

    .dial::after {
        display: none;
    }

    /* No text inside or beside the dial on mobile — the arc speaks for
       itself and the "One stop for …" heading is the read-out. */
    .dial__core,
    .dial__side-label {
        display: none;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }

    .contact__map,
    .contact__map iframe {
        min-height: 300px;
    }

    .strip__grid {
        --service-card-w: min(82vw, 330px);
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        padding-inline: var(--gutter);
        scroll-padding-inline: var(--gutter);
        padding-top: var(--space-3);
        padding-bottom: calc(var(--space-6) + 34px);
        scroll-snap-type: none;
        perspective: none;
        align-items: flex-start;
    }

    .service-card {
        transform-origin: center center;
    }

    .service-card {
        transition: transform 0.16s ease, opacity 0.16s ease, border-color 0.2s ease;
    }

    .cta__layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        align-items: start;
    }

    .cta__aside {
        height: 520px;
        margin-top: 0;
        padding-top: 0;
    }

    .cta-card {
        width: 100%;
    }

    .contact__base {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .hero {
        padding-top: var(--space-4);
    }

    .hero__title {
        font-size: clamp(1.8rem, 8.8vw, 2.3rem);
        max-width: 100%;
    }

    .hero__kicker {
        font-size: 0.73rem;
    }

    .service-meta {
        gap: var(--space-2);
    }

    .service-meta li {
        min-width: 45%;
    }

    .cta {
        padding-block: var(--space-12);
    }

    .cta__title {
        font-size: clamp(2rem, 8.4vw, 2.55rem);
        max-width: 14ch;
    }

    .cta__lede {
        font-size: 0.98rem;
        margin: var(--space-2) 0 var(--space-4);
    }

    .cta__cards {
        gap: 12px;
    }

    .cta__aside {
        height: 420px;
        margin-top: 0;
    }

    .cta-card {
        width: 100%;
        padding: var(--space-3);
    }

    .cta-card h3 {
        font-size: 1.4rem;
        line-height: 1.12;
    }

    .cta-card p {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .cta-form {
        padding: 16px;
    }

    .cta-form__row {
        grid-template-columns: 1fr;
    }

    .partners {
        grid-template-columns: 1fr;
    }

    .contact__socials {
        gap: 8px;
    }

    .contact__socials a {
        min-height: 38px;
        padding-inline: 12px;
    }

    .contact__map,
    .contact__map iframe {
        min-height: 250px;
    }

    .contact__map-link {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .dial-stage {
        height: 200px;
    }

    .dial {
        width: min(160vw, 720px);
    }

    .strip__grid {
        --service-card-w: min(86vw, 300px);
        gap: var(--space-2);
        padding-bottom: calc(var(--space-6) + 38px);
    }
}