/* ==========================================================================
   FISSION MONSTER — RESPONSIVE FIXES (≤1024px)
   Add this file AFTER your existing site.css / custom.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHARED UTILITIES
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. HEADER — TABLET & MOBILE
   -------------------------------------------------------------------------- */

/* Base header reset for all screens */
.fm-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
    padding: 36px 5%;
    transition:
        padding 0.45s ease,
        opacity 1.1s ease,
        transform 1.1s ease;
}

.fm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1300px;
    padding: 12px 28px;
    pointer-events: auto;
    border-radius: 100px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Scrolled pill — desktop */
.fm-header.scrolled {
    padding: 18px 5%;
}
.fm-header.scrolled .fm-header-inner {
    background: rgba(12, 12, 12, 0.88);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.55);
}

/* Logo */
.fm-header-logo img {
    height: 28px;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

/* Nav — desktop */
.fm-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    pointer-events: auto;
}

.fm-nav a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-family: "SF Mono", monospace, sans-serif;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
}
.fm-nav a:hover {
    color: #fff;
}
.fm-nav a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #287dc2;
    transform: translateX(-50%);
    transition: width 0.35s ease;
}
.fm-nav a:hover::after {
    width: 100%;
}

/* Book Now button */
.fm-nav a.fm-contact-btn {
    border: 1px solid rgba(255, 255, 255, 0.75);
    padding: 10px 22px;
    border-radius: 30px;
    color: #fff;
    overflow: hidden;
    transition: all 0.32s ease;
}
.fm-nav a.fm-contact-btn .btn-fill {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: 30px;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 0;
}
.fm-nav a.fm-contact-btn .btn-label {
    position: relative;
    z-index: 2;
    pointer-events: none;
    transition: color 0.32s ease;
}
.fm-nav a.fm-contact-btn:hover .btn-fill {
    transform: scaleX(1);
    transform-origin: left center;
}
.fm-nav a.fm-contact-btn:hover .btn-label {
    color: #080808;
}
.fm-nav a.fm-contact-btn:hover {
    color: #000;
    border-color: #fff;
}

/* Hamburger — hidden on desktop */
.fm-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 9px 11px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
}
.fm-hamburger:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}
.fm-hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: #fff;
    border-radius: 2px;
    transition:
        transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.25s ease,
        width 0.3s ease;
}
.fm-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.fm-hamburger.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.fm-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   2. TABLET (≤1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    /* Header layout */
    .fm-header {
        padding: 20px 20px;
        justify-content: flex-start;
    }
    .fm-header.scrolled {
        padding: 14px 20px;
    }
    .fm-header-inner {
        padding: 10px 18px;
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
    }
    .fm-header.scrolled .fm-header-inner {
        border-radius: 14px;
    }

    /* Show hamburger, hide desktop nav */
    .fm-hamburger {
        display: flex;
    }
    .fm-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        background: rgba(8, 8, 8, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin-left: 0;
        z-index: 10000;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        border-radius: 0;
        padding: 0;
    }
    .fm-nav.open {
        right: 0;
    }
    .fm-nav a {
        font-size: 16px;
        letter-spacing: 0.12em;
        padding: 13px 36px;
        color: rgba(255, 255, 255, 0.7) !important;
        opacity: 0;
        transform: translateX(28px);
        transition:
            color 0.3s ease,
            opacity 0.4s ease,
            transform 0.4s ease;
    }
    .fm-nav.open a {
        opacity: 1;
        transform: translateX(0);
    }
    .fm-nav.open a:nth-child(1) {
        transition-delay: 0.07s;
    }
    .fm-nav.open a:nth-child(2) {
        transition-delay: 0.13s;
    }
    .fm-nav.open a:nth-child(3) {
        transition-delay: 0.19s;
    }
    .fm-nav.open a:nth-child(4) {
        transition-delay: 0.25s;
    }
    .fm-nav.open a:nth-child(5) {
        transition-delay: 0.31s;
    }
    .fm-nav.open a:nth-child(6) {
        transition-delay: 0.37s;
    }
    .fm-nav.open a:nth-child(7) {
        transition-delay: 0.43s;
    }

    .fm-nav a.fm-contact-btn {
        margin-top: 16px;
        padding: 13px 42px;
        font-size: 13px;
    }
    .fm-nav a::after {
        display: none;
    }

    /* Hero panel */
    .screen-panel_home {
        height: 100svh !important;
    }

    /* Hero title */
    .interactive-title .title-line {
        font-size: 13vw !important;
        line-height: 0.88 !important;
    }
    .interactive-title .world-best p {
        font-size: 10px !important;
        letter-spacing: 0.12em;
    }
    .interactive-title .world-best {
        margin-top: 24px;
        gap: 14px;
    }

    /* Business section columns */
    .business__tasks.animated-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }
    .animated-columns__i {
        width: 100% !important;
        float: none !important;
    }

    /* Certificates */
    .fm-certificates-list {
        flex-direction: row;
        gap: 20px;
    }
    .fm-cert-item {
        max-width: calc(50% - 10px);
        width: calc(50% - 10px);
    }

    /* Client marquee */
    .fm-logo-item {
        width: 140px;
        height: 80px;
        margin: 0 1rem;
    }

    /* Reviews grid */
    .fm-reviews-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-left: 0;
    }
    .fm-reviews-section .fm-heading,
    .fm-reviews-section .fm-subheading {
        margin-left: 0;
    }

    /* Footer top grid */
    .f-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .f-form-card {
        max-width: 100%;
        width: 100%;
    }
    .f-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Fans section */
    .fm-fans-section .title {
        font-size: clamp(2rem, 5vw, 3.5rem) !important;
    }

    /* Manifesto */
    .fm-decrypt-heading {
        font-size: clamp(2.2rem, 5vw, 4rem) !important;
    }
    .fm-manifesto-text {
        font-size: 1rem !important;
    }
}

/* --------------------------------------------------------------------------
   3. MOBILE (≤768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Header */
    .fm-header {
        padding: 16px 16px;
    }
    .fm-header.scrolled {
        padding: 12px 16px;
    }
    .fm-header-inner {
        padding: 9px 14px;
    }
    .fm-header-logo img {
        height: 24px;
    }

    /* Hero */
    .screen-panel_home {
        height: 100svh !important;
        min-height: 560px !important;
    }
    .interactive-title {
        left: 5% !important;
        top: 48% !important;
        right: 5%;
    }
    .interactive-title .title-line {
        font-size: 17vw !important;
        line-height: 0.9 !important;
    }
    .interactive-title .world-best {
        margin-top: 18px;
        gap: 12px;
    }
    .interactive-title .world-best-line {
        width: 36px;
    }
    .interactive-title .world-best p {
        font-size: 9px !important;
    }

    /* Manifesto */
    .fm-manifesto-section {
        padding: 5rem 5% !important;
        min-height: auto !important;
    }
    .fm-decrypt-heading {
        font-size: clamp(1.9rem, 7vw, 3rem) !important;
        letter-spacing: -0.02em !important;
    }
    .fm-manifesto-text {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
    }
    .fm-robot-drone-wrapper {
        display: none;
    }

    /* Business */
    .business__tasks.animated-columns {
        display: flex !important;
        flex-direction: column !important;
        gap: 28px !important;
    }
    .animated-columns__i {
        width: 100% !important;
        float: none !important;
    }
    .inner-section .title.smaller-font-size,
    .title {
        font-size: clamp(1.7rem, 6vw, 2.6rem) !important;
    }

    .fm-cert-item {
        max-width: 340px;
        width: 100%;
    }
    .fm-cert-section {
        padding: 24px 20px;
    }

    /* Client logos */
    .fm-clients-container {
        padding: 0 5%;
    }
    .fm-logo-item {
        width: 110px;
        height: 64px;
        margin: 0 0.7rem;
    }

    /* Fans section */
    .fm-fans-section .title {
        font-size: clamp(1.7rem, 7vw, 2.8rem) !important;
        line-height: 1.15 !important;
        margin-bottom: 1.5rem !important;
    }
    .fm-fans-section .text {
        font-size: 1rem;
    }

    /* Reviews */
    .fm-reviews-section {
        padding: 4rem 5%;
    }
    .fm-reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-left: 0;
    }
    .fm-reviews-section .fm-heading,
    .fm-reviews-section .fm-subheading {
        margin-left: 0;
    }
    .fm-reviews-header-wrapper {
        padding-left: 0;
    }
    .fm-reviews-section .fm-heading {
        font-size: clamp(1.8rem, 7vw, 2.6rem);
    }

    /* Ticker */
    .fm-ticker-item {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }
    .fm-ticker-separator {
        margin: 0 28px;
        height: 14px;
    }

    /* Footer */
    .f-inner {
        padding: 0 16px;
    }
    .f-top {
        padding-bottom: 36px;
    }
    .f-nav-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .f-email-link {
        font-size: clamp(1.5rem, 5vw, 2.4rem) !important;
        margin-bottom: 20px;
    }
    .f-form-card {
        padding: 24px 20px;
    }
    .f-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 0;
    }
    .f-bottom-links {
        flex-wrap: wrap;
        gap: 12px;
    }
    .f-copyright {
        font-size: 0.75rem;
    }
    .f-address {
        font-size: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
   4. SMALL MOBILE (≤575px)
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
    /* Hero */
    .interactive-title .title-line {
        font-size: 20vw !important;
    }

    /* Certificates */
    .fm-cert-item {
        padding: 1.8rem 1.2rem !important;
    }
    .fm-cert-logo {
        height: 90px;
    }

    /* Reviews */
    .fm-review-card {
        padding: 1.5rem !important;
    }
    .fm-quote-watermark {
        font-size: 110px;
    }

    /* Footer nav — single column */
    .f-nav-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .f-field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Manifesto */
    .fm-decrypt-heading {
        font-size: clamp(1.6rem, 9vw, 2.4rem) !important;
    }

    /* Fans */
    .fm-fans-section .title {
        font-size: clamp(1.5rem, 8vw, 2.2rem) !important;
    }

    /* Business title */
    .title {
        font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
    }

    /* Pre-title */
    .pre-title__label {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
}
@media (max-width: 480px) {
    .fm-nav a {
        margin: 4px 0 !important; /* Super tight gap */
        font-size: 14px !important;
    }
    .fm-contact-btn {
        display: none !important; /* Hide the button on very small screens to save space */
    }
    #fm-nav {
        padding-top: 20px !important; /* Move the menu items up slightly when open */
    }
    .business__tasks.animated-columns {
        gap: 0px !important;
        padding: 20px !important;
    }
}
/* --------------------------------------------------------------------------
   5. VERY SMALL (≤400px)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
    .fm-header {
        padding: 14px 12px;
    }
    .fm-header-logo img {
        height: 20px;
    }
    .interactive-title .title-line {
        font-size: 22vw !important;
    }
    .fm-decrypt-heading {
        font-size: clamp(1.4rem, 10vw, 2rem) !important;
    }
    .fm-cert-item {
        padding: 1.4rem 1rem !important;
    }
    .f-bottom-links {
        gap: 8px;
    }
    .f-bottom-links a {
        font-size: 0.72rem;
    }
    .fm-ticker-item {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    .fm-ticker-separator {
        margin: 0 18px;
    }
}

/* --------------------------------------------------------------------------
   6. INNER-CONTENT WRAP PADDING FIX (all mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .inner-content-wrap {
        padding: 0 5% !important;
    }
    .content-wrap {
        padding: 0 !important;
    }
    /* Section vertical spacing */
    .inner-section {
        padding-top: 15px !important;
        padding-bottom: 0px !important;
    }
    .fm-reviews-section .fm-container,
    .fm-fans-section .inner-content-wrap,
    .business .inner-content-wrap {
        padding: 0 5% !important;
    }
    /* Glitch positioning fix */
    .glitch {
        display: none;
    }
    .fm-certificates-list {
        display: flex;
        justify-content: center;
        /* flex-wrap: wrap; */
        gap: 3rem;
        list-style: none;
        padding: 3rem 0 0 0;
        margin: 0;
        flex-direction: row !important;
    }
}

/* --------------------------------------------------------------------------
   7. CANVAS HEIGHT FIX
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    #fm-wrap,
    #fmc-wrap {
        height: 100% !important;
        min-height: 100%;
    }
}

/* --------------------------------------------------------------------------
   8. EFFECTIVENESS / CREATIVITY SECTION — force hide on mobile (already display:none)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .two-ways,
    .creativity-mob {
        display: none !important;
    }
    .effectiveness,
    .creativity {
        width: 100% !important;
        min-height: 280px;
    }
    .shadows .shadow {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   9. SCROLL-DOWN INDICATOR — hide on short screens
   -------------------------------------------------------------------------- */
@media (max-height: 600px) {
    .scroll-down {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   10. FOOTER DARK BG FIX
   -------------------------------------------------------------------------- */
.site-footer,
.contacts.inner-section {
    background: #0d0d0d;
    color: #fff;
}
.f-nav-col h4 {
    color: rgba(255, 255, 255, 0.45);
}
.f-nav-col ul li a {
    color: rgba(255, 255, 255, 0.75);
}
.f-nav-col ul li a::before {
    color: rgba(255, 255, 255, 0.35);
}
.f-nav-col ul li a:hover {
    color: #fff;
}
.f-copyright,
.f-address {
    color: rgba(255, 255, 255, 0.45);
}
.f-bottom-links a {
    color: rgba(255, 255, 255, 0.45);
}
.f-bottom-links a:hover {
    color: #fff;
}
.f-bottom {
    border-color: rgba(255, 255, 255, 0.1);
}
.f-top {
    border-color: rgba(255, 255, 255, 0.1);
}
/* .pre-title__label span { color: rgba(255,255,255,0.55); } */
.f-email-link {
    color: #fff;
}
.f-email-link:hover {
    color: #287dc2;
}
.f-badge-webflow {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* --------------------------------------------------------------------------
   11. FM-HEADER ENTRANCE ANIMATION (keep across all screen sizes)
   -------------------------------------------------------------------------- */
.fm-header {
    opacity: 0;
    transform: translateY(-24px);
}
.fm-header.header-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   12. PREVENT OVERFLOW ON MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    body,
    html {
        overflow-x: hidden !important;
    }
    .fm-text-ticker {
        overflow: hidden;
    }
    .fm-logo-marquee {
        overflow: hidden;
    }
    .web-production .world-best {
        margin-left: 20px !important; /* Adjust this value to slide it left/right */
        justify-content: flex-start !important; /* Forces it to start from the left */
        width: 100% !important;
        padding-left: 10vw !important; /* Uses fluid width to match the text scaling */
    }
}

@media (max-width: 768px) {
    /* Mobile sizing */
    .web-production .title-line {
        font-size: 14vw !important; /* Slightly larger relative ratio for tiny phones */
    }

    /* Adjust the small tagline text underneath so it doesn't overlap */
    .web-production .world-best {
        margin-top: 15px !important;
    }
    .f-nav-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}
/* =======================================================
       FOOTER LAYOUT FIX (TABLET & MOBILE)
       ======================================================= */

@media (max-width: 900px) {
    /* 1. Stack the left section (menus) and right section (form) vertically */
    .site-footer .f-top {
        display: flex !important;
        flex-direction: column !important;
        gap: 60px !important; /* Space between menus and the form below */
    }

    /* 2. Allow the left side to take up the full width of the screen */
    .site-footer .f-left {
        width: 100% !important;
        padding-right: 0 !important;
    }

    /* 3. Force the menus to stay in a 1-row, 4-column layout */
    .site-footer .f-nav-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; /* 4 equal columns */
        gap: 15px !important;
        width: 100% !important;
    }

    /* 4. Let the contact form expand to full width under the menus */
    .site-footer .f-form-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
}

/* --- TINY PHONE SAFEGUARD --- */
/* On screens smaller than 600px, 4 columns will overlap and look messy. 
       This drops it into a clean 2x2 grid just for small phones. */
@media (max-width: 600px) {
    .site-footer .f-nav-grid {
        grid-template-columns: repeat(
            2,
            1fr
        ) !important; /* 2 columns, 2 rows */
        gap: 40px 20px !important;
    }

    /* Adjust the massive email text for small phones */
    .site-footer .f-email-link {
        font-size: 8vw !important;
    }
}
/* =======================================================
       COMPACT MOBILE MENU FOR SMALL SCREENS (480px & below)
       ======================================================= */
@media (max-width: 480px) {
    /* Reduce font size and vertical spacing for the links */
    .fm-nav a {
        font-size: 15px !important;
        margin: 8px 0 !important;
        letter-spacing: 0.1em !important;
    }

    /* Slightly shrink the "Book Now" button to match the new scale */
    .fm-nav .fm-contact-btn {
        margin-top: 10px !important;
        transform: scale(0.9);
    }
}

/* Extra safeguard: If the screen height is extremely short (like turning a phone sideways) */
@media (max-height: 450px) {
    .fm-nav {
        justify-content: flex-start !important;
        padding-top: 80px !important;
        overflow-y: auto !important; /* Allows scrolling inside the menu if it still overflows */
    }
    .fm-nav a {
        font-size: 14px !important;
        margin: 6px 0 !important;
    }
}
@media (max-width: 1024px) {
    /* Tablet sizing */
    .web-production .title-line {
        font-size: 10vw !important; /* Scales fluidly with the screen width */
        line-height: 1 !important; /* Tightens the gap between the words */
        margin: 0 !important;
    }
}
