/* Mobile conversion tuning: earlier CTA, compact proof, and thumb-friendly RFQ. */
@media (max-width: 768px) {
    html.page-home {
        scroll-padding-top: calc(64px + env(safe-area-inset-top, 0px) + 10px);
    }

    html.page-home #contact {
        scroll-margin-top: calc(64px + env(safe-area-inset-top, 0px) + 18px);
    }

    html.page-home body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }

    html.page-home .hero {
        min-height: auto !important;
        padding: calc(64px + env(safe-area-inset-top, 0px) + 20px) 20px 34px !important;
        text-align: left !important;
    }

    html.page-home .hero-container {
        align-items: stretch !important;
        gap: 0 !important;
    }

    html.page-home .hero-content h1 {
        order: 0 !important;
        min-height: 0 !important;
        margin-bottom: 12px !important;
        font-size: clamp(30px, 8.8vw, 38px) !important;
        line-height: 1.05 !important;
    }

    html.page-home .hero-content .hero-desc {
        order: 1 !important;
        display: -webkit-box !important;
        max-width: 34ch !important;
        margin: 0 0 14px !important;
        color: rgba(220, 231, 227, 0.86) !important;
        font-size: 14px !important;
        line-height: 1.58 !important;
        text-align: left !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden !important;
    }

    html.page-home .hero-content .hero-platform-note {
        display: none !important;
    }

    html.page-home .hero-content .hero-buttons {
        order: 2 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 360px !important;
        margin: 0 0 16px !important;
    }

    html.page-home .hero-buttons .btn-primary,
    html.page-home .hero-buttons .btn-secondary {
        min-height: 50px !important;
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    html.page-home .hero-buttons .btn-primary {
        box-shadow: 0 14px 28px rgba(54, 184, 169, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    }

    html.page-home .hero-content .hero-points {
        display: none !important;
    }

    html.page-home .point-chip svg {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
        margin-top: 2px !important;
    }

    html.page-home .point-chip span {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
    }

    html.page-home .hero-visual {
        order: 3 !important;
        width: min(100%, 400px) !important;
        max-width: 400px !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    html.page-home .hero-img-main {
        aspect-ratio: 16 / 11 !important;
        border-radius: 18px !important;
    }

    html.page-home .hero-img-main img {
        object-position: 50% center !important;
    }

    html.page-home .hero-visual .floating-card {
        width: auto !important;
        max-width: min(46vw, 168px) !important;
        padding: 8px 10px !important;
        border-radius: 14px !important;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)), rgba(6, 31, 38, 0.58) !important;
    }

    html.page-home .hero-visual .fc-1 {
        top: 10px !important;
        right: 10px !important;
    }

    html.page-home .hero-visual .fc-2 {
        left: 10px !important;
        bottom: 10px !important;
    }

    html.page-home .hero-visual .fc-3 {
        display: none !important;
    }

    html.page-home .fc-icon {
        flex-basis: 32px !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        border-radius: 10px !important;
    }

    html.page-home .fc-text .fc-title {
        font-size: 11.5px !important;
    }

    html.page-home .hero-stats {
        order: 4 !important;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        max-width: 400px !important;
        margin-top: 14px !important;
        padding-top: 10px !important;
        border-top-color: rgba(255, 255, 255, 0.08) !important;
    }

    html.page-home .hero-stats .stat {
        padding: 8px 4px 7px !important;
        border-radius: 10px !important;
    }

    html.page-home .hero-stats .stat-value {
        font-size: clamp(17px, 5vw, 21px) !important;
    }

    html.page-home .hero-stats .stat p:last-child {
        font-size: 8.5px !important;
        line-height: 1.2 !important;
    }

    .mobile-conversion-bar {
        position: fixed;
        left: calc(10px + env(safe-area-inset-left, 0px));
        right: calc(10px + env(safe-area-inset-right, 0px));
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 1520;
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
        gap: 8px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(8, 32, 40, 0.88), rgba(10, 12, 11, 0.88));
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(18px) saturate(140%);
        -webkit-backdrop-filter: blur(18px) saturate(140%);
        transition: transform 0.24s ease, opacity 0.24s ease, visibility 0.24s ease;
    }

    .mobile-conversion-bar a {
        min-width: 0;
        min-height: 48px;
        border-radius: 13px;
        color: #fff;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-conversion-bar__quote {
        flex-direction: column;
        gap: 1px;
        background: linear-gradient(135deg, var(--primary-dark), var(--primary));
        box-shadow: 0 10px 24px rgba(54, 184, 169, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    }

    .mobile-conversion-bar__quote span {
        font-size: 14px;
        font-weight: 800;
        line-height: 1.1;
    }

    .mobile-conversion-bar__quote small {
        color: rgba(255, 255, 255, 0.76);
        font-size: 10.5px;
        line-height: 1.1;
    }

    .mobile-conversion-bar__whatsapp {
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.08);
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-conversion-bar__whatsapp .icons {
        width: 18px !important;
        height: 18px !important;
    }

    html.page-home .whatsapp-float {
        display: none !important;
    }

    html.page-home .back-to-top {
        right: calc(14px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
        width: 42px !important;
        height: 42px !important;
    }

    body.nav-open .mobile-conversion-bar {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.contact-in-view .mobile-conversion-bar {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(calc(100% + 18px));
    }

    .mobile-rfq-promise {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 7px;
        margin: 2px 0 4px;
    }

    .mobile-rfq-promise span {
        display: flex;
        align-items: center;
        min-height: 34px;
        padding: 8px 10px;
        border: 1px solid rgba(54, 184, 169, 0.16);
        border-radius: 11px;
        background: rgba(54, 184, 169, 0.10);
        color: rgba(223, 251, 255, 0.9);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.25;
    }

    html.page-home #contact .quote-form-head {
        padding-bottom: 14px !important;
    }

    html.page-home #contact .quote-form-head h3 {
        font-size: 22px !important;
    }

    html.page-home #contact .quote-form-head p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    html.page-home #contact .contact-form {
        padding: 20px 16px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    }

    html.page-home #contact .form-group input,
    html.page-home #contact .form-group select,
    html.page-home #contact .form-group textarea {
        border-radius: 12px !important;
    }

    html.page-home #contact .form-group textarea {
        min-height: 118px !important;
    }

    html.page-home #contact .file-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px !important;
        align-items: center;
        width: 100%;
        margin-top: 12px !important;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
    }

    html.page-home #contact .file-name {
        min-width: 0;
        color: #eafcff;
        font-size: 12px !important;
        font-weight: 700;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    html.page-home #contact .file-name small {
        display: block;
        margin-top: 2px;
        color: rgba(220, 231, 227, 0.62);
        font-size: 10.5px;
        font-weight: 600;
    }

    html.page-home #contact .remove-btn {
        min-height: 32px;
        padding: 6px 10px !important;
        border: 1px solid rgba(255, 143, 143, 0.28) !important;
        border-radius: 10px;
        background: rgba(255, 143, 143, 0.12) !important;
        color: #ffd4d4 !important;
        font-size: 11px;
        font-weight: 800;
    }

    html.page-home #contact .upload-status {
        grid-column: 1 / -1;
        font-size: 11px !important;
        font-weight: 800;
        line-height: 1.2;
    }

    html.page-home #contact .form-submit .btn-primary {
        width: 100% !important;
        min-height: 52px !important;
        border-radius: 14px !important;
    }

    html.page-home #contact .form-submit label,
    html.page-home #contact .form-submit p {
        font-size: 11.5px !important;
    }
}

@media (min-width: 769px) {
    .mobile-conversion-bar,
    .mobile-rfq-promise {
        display: none !important;
    }
}

@media (max-width: 360px) {
    .mobile-conversion-bar {
        grid-template-columns: 1fr;
    }

    html.page-home .hero-content .hero-points {
        grid-template-columns: 1fr !important;
    }
}
