/*
 * Arpeggio Agency – Mobile Stylesheet
 * All rules are scoped to @media (max-width: 768px).
 * The desktop layout is NEVER touched.
 */

@media (max-width: 768px) {

    /* ── GLOBAL ── */
    html,
    body {
        -webkit-text-size-adjust: 100%;
    }

    /* ── NAVBAR ── */
    /* Hide social links row – only hamburger stays */
    nav[class*="fixed"]>div:first-child {
        display: none !important;
    }

    nav[class*="fixed"]>button {
        width: 44px !important;
        height: 44px !important;
    }

    /* Logo on form-template: keep it centred */
    a[aria-label="Home"][style*="position: fixed"] {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    /* ── HERO — full-screen cover ── */

    /* Sticky container fills full dynamic viewport */
    .sticky.top-0.h-screen.w-full.overflow-hidden {
        height: 100dvh !important;
        width: 100vw !important;
    }

    .sticky.top-0.h-screen.w-full.overflow-hidden>div {
        width: 100% !important;
        height: 100% !important;
    }

    /* Hero photo: full bleed cover */
    .sticky.top-0.h-screen.w-full.overflow-hidden img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
    }

    /* Text overlay: stack columns, tighter padding */
    .absolute.inset-0.flex.flex-col.justify-between {
        padding: 90px 20px 28px !important;
    }

    .flex.justify-between.items-start.mt-8,
    .flex.justify-between.items-start.mt-8.md\:mt-12 {
        flex-direction: column !important;
        gap: 20px !important;
        margin-top: 0 !important;
    }

    .max-w-\[65vw\],
    .max-w-\[50vw\] {
        max-width: 100% !important;
    }

    .text-right {
        text-align: left !important;
    }

    h2.text-4xl {
        font-size: clamp(26px, 7vw, 38px) !important;
    }

    /* ── VIDEO SHOWCASE — full-screen start, shrinks on scroll ── */

    /* Section: fill viewport */
    section.relative.h-screen.w-full.bg-black {
        width: 100vw !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    section.relative.h-screen.w-full.bg-black>div {
        width: 100vw !important;
        height: 100dvh !important;
    }

    /* Video wrapper: fill screen (GSAP shrinks on scroll) */
    section.relative.h-screen.w-full.bg-black .relative.z-20.w-full.h-full {
        width: 100vw !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    /* iframe: fill wrapper without the desktop 150%/−15% centering offset */
    section.relative.h-screen.w-full.bg-black iframe {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
    }

    /* "Design that captivates…" heading */
    section.relative.h-screen.w-full.bg-black h1 {
        font-size: clamp(2rem, 9vw, 4rem) !important;
        padding: 0 16px !important;
        text-align: center !important;
    }

    /* ── PORTFOLIO SCATTER CARDS ──
       Desktop: absolutely placed with ±30–38vw offsets → off screen on mobile.
       Mobile: grid them inside the flex container so they're visible.
    ── */
    /* Inner flex row becomes a wrapping grid */
    section.relative.h-screen.w-full.bg-black .relative.h-screen.w-full.flex.items-center.justify-center {
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 10px !important;
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }

    /* Each card: relative, square-ish, reasonable size */
    .absolute.w-\[25vw\].h-\[35vh\].rounded-\[2rem\] {
        position: relative !important;
        width: 42vw !important;
        height: 28vw !important;
        display: inline-block !important;
        transform: none !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
        overflow: hidden !important;
    }

    /* ── PROJECT PROMOS ── */
    .sticky.top-0.h-screen.w-full.flex.flex-col {
        height: 100dvh !important;
        width: 100vw !important;
        overflow: hidden !important;
    }

    .relative.z-10.w-full.px-8 {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 80px !important;
    }

    /* Title+client row → stack vertically */
    .flex.flex-row.items-center.justify-start.gap-8 {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    /* Title: wrap + clamp size */
    .text-5xl.font-bold.whitespace-nowrap {
        white-space: normal !important;
        font-size: clamp(28px, 8vw, 48px) !important;
        line-height: 1.1 !important;
    }

    /* Decorative horizontal rule: hide on mobile */
    .flex-1.h-\[1px\].bg-\[#f6f6f6\] {
        display: none !important;
    }

    .text-xl.font-normal.opacity-90 {
        font-size: 16px !important;
    }

    /* ── WHAT WE DO ── */
    h2.text-\[24vw\],
    h2[class*="24vw"] {
        font-size: clamp(56px, 20vw, 96px) !important;
        white-space: normal !important;
        line-height: 0.9 !important;
    }

    h4.text-xl,
    h4.text-3xl {
        font-size: 20px !important;
        line-height: 1.35 !important;
    }

    section.w-full.text-black.relative.z-50 {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ── BENEFITS BENTO GRID ──
       Uses hard-coded inline style, so we must override with attribute selector.
    ── */
    div[style*="grid-template-columns: repeat(5, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    div[style*="grid-column"],
    div[style*="gridColumn"] {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 200px !important;
    }

    section[id="benefits"] .max-w-\[1400px\] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ── PRICING ── */
    h2.text-5xl.md\:text-7xl {
        font-size: clamp(32px, 9vw, 52px) !important;
        line-height: 1.1 !important;
    }

    h5.text-xl.md\:text-3xl {
        font-size: 16px !important;
    }

    /* 3D decorative box */
    .relative.w-64.h-24 {
        width: 150px !important;
        height: 56px !important;
        left: 0 !important;
        margin-left: 0 !important;
    }

    section[id="pricing"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ── TESTIMONIALS / FAQ / JOURNAL / CTA ── */
    section[id="testimonials"],
    section[id="faq"],
    section[id="journal"],
    [class*="CTA"],
    [class*="cta"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
        overflow-x: hidden;
    }

    [class*="CTA"] h1,
    [class*="CTA"] h2 {
        font-size: clamp(40px, 12vw, 80px) !important;
        line-height: 1 !important;
    }

    /* ── FOOTER ── */
    footer.bg-white {
        overflow-x: hidden;
    }

    footer .px-8.pt-12 {
        flex-direction: column !important;
        gap: 24px !important;
    }

    footer img[alt="Logo"] {
        max-width: 70vw !important;
    }

    footer .grid.grid-cols-1.md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    footer .border-r {
        border-right: none !important;
        padding-right: 0 !important;
    }

    footer .px-8 {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    footer .text-\[36px\] {
        font-size: 24px !important;
    }

    footer .py-8.flex {
        flex-direction: column !important;
        gap: 24px !important;
        align-items: flex-start !important;
    }

    footer a[href^="tel"] {
        font-size: 22px !important;
    }

    /* ── PAGE-WITH-FORM TEMPLATE ── */
    .agp-content-area {
        padding-top: 70px !important;
    }

    .elementor-form,
    .elementor-widget-form {
        width: 100% !important;
    }

    .elementor-field-group {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    .elementor-column.elementor-col-50,
    .elementor-column.elementor-col-33,
    .elementor-column.elementor-col-25 {
        width: 100% !important;
    }

    /* ── GLOBAL SAFETY NET ──
       Only cap width on in-flow images to prevent overflow.
       Do NOT set height:auto globally — it collapses absolutely-positioned
       full-height background images (e.g. ProjectPromos, Benefits cards).
    ── */
    img:not([class*="absolute"]):not([style*="position"]),
    video,
    embed,
    object {
        max-width: 100%;
    }

    /* Only reset height on simple inline/block content images */
    img:not([class*="absolute"]):not([class*="h-full"]):not([style*="height"]) {
        height: auto;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

}

/* end @media (max-width: 768px) */