/* ============================================================
   TECHBOX — responsive.css
   Mobile-first refinements for phones and tablets.
   ============================================================ */

html, body {
    overflow-x: clip;
    max-width: 100%;
}

img, svg, video, canvas {
    max-width: 100%;
}
img:not(.logo-mark):not(.logo-wordmark):not(.hero-brand-wordmark):not(.hero-media img):not(.page-hero-bg img):not(.sol-tile img):not(.spot-main img):not(.spot-side img):not(.proj-thumb img):not(.service-lead-media img):not(.solution-visual img) {
    height: auto;
}
.hero-media img,
.page-hero-bg img,
.sol-tile img,
.spot-main img,
.spot-side img,
.proj-thumb img,
.service-lead-media img,
.solution-visual img {
    max-width: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1200px) {
    .sol-strip,
    .sol-strip.dense { grid-template-columns: repeat(2, 1fr); }
    .process-rail { grid-template-columns: repeat(3, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
    .nav { display: none; }
    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .header-cta {
        margin-left: auto;
        display: flex;
        align-items: center;
        align-self: center;
    }
    .header-cta .btn-primary { display: none; }
    .spotlight { grid-template-columns: 1fr; min-height: 0; }
    .spot-main { min-height: 380px; }
    .spot-side { min-height: 280px; }
    .ind-strip { grid-template-columns: repeat(2, 1fr); }
    .proj-grid { grid-template-columns: repeat(2, 1fr); }
    .proj-card--featured { grid-column: span 2; }
    .service-features { grid-template-columns: repeat(2, 1fr); }
    .service-lead,
    .about-grid,
    .contact-grid,
    .solution,
    .feature-split,
    .case-study { grid-template-columns: 1fr; }
    .case-meta { position: static; }
    .solution.reverse .solution-content,
    .solution.reverse .solution-visual { order: initial; }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid,
    .value-grid,
    .why-grid,
    .about-stats,
    .timeline { grid-template-columns: 1fr 1fr; }
    .logo-mark {
        height: 40px;
        max-width: 72px;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 68px;
        --section-y: clamp(48px, 10vw, 80px);
        --gutter: 18px;
    }

    .selector-grid { grid-template-columns: 1fr 1fr; }
    .process-rail { grid-template-columns: 1fr 1fr; }
    .form-grid,
    .checkbox-grid,
    .check-grid,
    .service-list { grid-template-columns: 1fr; }

    .hero {
        min-height: auto;
        min-height: 100svh;
        padding: calc(var(--header-h) + 24px) 0 118px;
        align-items: flex-end;
        justify-content: flex-start;
    }
    .hero-media img {
        object-position: center 42%;
    }
    /* Strong bottom scrim through the copy zone — bright slides wash out white type */
    .hero-media::after {
        background:
            linear-gradient(
                0deg,
                rgba(7,10,16,0.96) 0%,
                rgba(7,10,16,0.9) 22%,
                rgba(7,10,16,0.78) 42%,
                rgba(7,10,16,0.55) 58%,
                rgba(7,10,16,0.22) 74%,
                rgba(7,10,16,0.06) 88%,
                transparent 100%
            ),
            linear-gradient(
                180deg,
                rgba(7,10,16,0.35) 0%,
                rgba(7,10,16,0.1) 28%,
                transparent 48%
            );
    }
    .hero-content,
    .hero > .container.hero-content {
        max-width: 100%;
        width: min(100% - (var(--gutter) * 2), 100%);
        margin-inline: var(--gutter) auto;
    }
    .hero-brand {
        max-width: 100%;
    }
    .hero-brand-wordmark {
        width: min(100%, clamp(180px, 70vw, 300px));
        filter:
            drop-shadow(0 2px 12px rgba(0, 0, 0, 0.75))
            drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
    }
    .hero-brand > span {
        white-space: normal;
        font-size: 0.72rem;
        letter-spacing: 0.16em;
        text-shadow:
            0 1px 2px rgba(0, 0, 0, 0.85),
            0 4px 18px rgba(0, 0, 0, 0.55);
    }
    .hero h1 {
        font-size: clamp(1.35rem, 5.5vw, 1.75rem);
        max-width: none;
        text-shadow:
            0 1px 3px rgba(0, 0, 0, 0.9),
            0 6px 28px rgba(0, 0, 0, 0.65);
    }
    .hero .hero-desc {
        font-size: 0.98rem;
        max-width: none;
        color: rgba(245,247,250,0.95);
        text-shadow:
            0 1px 3px rgba(0, 0, 0, 0.85),
            0 4px 20px rgba(0, 0, 0, 0.55);
    }
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .hero-cta .btn,
    .cta-buttons .btn,
    .page-hero .hero-cta .btn { width: 100%; }
    .hero-scroll { display: none; }

    .mobile-cta {
        display: grid;
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
    }
    .site-footer { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
    .section:has(#quoteForm),
    #formWrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

    .page-hero {
        padding: calc(var(--header-h) + 28px) 0 40px;
    }
    .page-hero--media {
        min-height: 0;
        align-items: flex-end;
        padding-bottom: 40px;
    }
    .page-hero h1 {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        max-width: none;
    }
    .page-hero .lead { max-width: none; }
    .page-hero .hero-cta {
        flex-direction: column;
        align-items: stretch;
        margin-top: 22px !important;
    }

    .section-head { margin-bottom: 28px; }
    .section-head h2 { font-size: clamp(1.55rem, 6.5vw, 2.1rem); }
    .sol-tile { min-height: 240px; }
    .spot-main { min-height: 320px; }
    .spot-side { min-height: 260px; }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions .btn { width: 100%; }
    .form-note { order: 2; text-align: center; }

    .proj-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
    }
    .proj-filters::-webkit-scrollbar { display: none; }
    .proj-filter { flex: 0 0 auto; }

    .mobile-menu {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
    .mobile-menu a {
        font-size: 1.2rem;
        padding: 16px 4px;
    }

    /* Prevent iOS input zoom */
    .field input,
    .field select,
    .field textarea,
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .selector-grid,
    .sol-strip,
    .sol-strip.dense,
    .ind-strip,
    .proj-grid,
    .service-features,
    .related-grid,
    .trust-grid,
    .values-grid,
    .value-grid,
    .why-grid,
    .about-stats,
    .timeline,
    .footer-grid,
    .ed-grid { grid-template-columns: 1fr; }

    .proj-card--featured { grid-column: auto; }
    .case-study { grid-template-columns: 1fr; }
    .case-meta { position: static; }

    .process-rail { grid-template-columns: 1fr; }

    .header-inner { gap: 10px; }
    .logo { gap: 8px; min-width: 0; }
    .logo-wordmark-wrap {
        width: clamp(100px, 34vw, 128px);
        height: 16px;
    }
    .logo-text small {
        font-size: 0.5rem;
        letter-spacing: 0.12em;
    }
    .logo-mark {
        height: 36px;
        max-width: 64px;
    }
    .hamburger {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .hero-brand-wordmark {
        width: min(100%, clamp(180px, 82vw, 300px));
    }
    .hero-cta,
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .btn-lg { width: 100%; }
    .btn {
        white-space: normal;
        text-align: center;
        line-height: 1.25;
        padding-inline: 16px;
    }

    .selector-card { min-height: 0; padding: 18px 16px; }
    .faq-teaser { flex-direction: column; align-items: flex-start; }
    .faq-teaser .btn { width: 100%; }
    .timeline-item { grid-template-columns: 1fr; }

    .footer-tagline h2 { max-width: none; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .fb-links { flex-wrap: wrap; gap: 12px 16px; }

    .contact-card,
    .form-card { padding: 18px; }

    .page-hero-bg::after {
        background:
            linear-gradient(180deg, rgba(7,10,16,0.45) 0%, rgba(7,10,16,0.88) 100%),
            linear-gradient(90deg, rgba(7,10,16,0.75), rgba(7,10,16,0.55));
    }
}

@media (max-width: 430px) {
    :root { --gutter: 16px; }

    .logo-text small { display: none; }
    .hero {
        padding-bottom: 118px;
    }
    .mobile-cta a {
        font-size: 0.7rem;
        padding: 11px 6px;
        gap: 4px;
    }
    .selector-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1441px) {
    :root { --container: 1320px; }
}

/* Prefer reduced motion already handled in style.css */
@supports (padding: max(0px)) {
    .site-header {
        padding-top: env(safe-area-inset-top);
    }
}
