/* =============================================================================
   Worldmaxxing — Custom Styles
   All project-specific overrides and component styles.
   Keep desktop intact — only add responsive rules below.
============================================================================= */


/* -----------------------------------------------------------------------------
   Global — prevent horizontal overflow on all viewports
----------------------------------------------------------------------------- */

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

img, video {
    max-width: 100%;
    height: auto;
}


/* -----------------------------------------------------------------------------
   Loader — fix centering, SVG cropping, text visibility
----------------------------------------------------------------------------- */

/* Ensure loader is truly full-screen and centered */
.loader-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    z-index: 999999999 !important;
}

/* SVG fills loader without cropping */
.loader-wrap svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;          /* fill loader container, never clip */
    z-index: 1;
}

/* Heading sits above the SVG */
.loader-wrap .loader-wrap-heading {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    text-align: center;
}

/* Fluid text — never overflows any screen width */
.loader-wrap .loader-wrap-heading .load-text {
    font-size: clamp(1.2rem, 6vw, 3.5rem) !important;
    letter-spacing: clamp(0.3rem, 2vw, 1.2rem) !important;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}


/* -----------------------------------------------------------------------------
   Navbar — logo class
----------------------------------------------------------------------------- */

.nav-logo {
    font-size: 24px;
    color: #fff;
    letter-spacing: 2px;
}

/* Ensure CA button is min touch target */
#copy-ca {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}


/* -----------------------------------------------------------------------------
   Hero Section
----------------------------------------------------------------------------- */

/* Video covers container properly */
.fit-img video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}


/* -----------------------------------------------------------------------------
   Contract Address — inline display in "How to Buy" section
----------------------------------------------------------------------------- */

.ca-display {
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.6;
}

.ca-short {
    display: none;     /* never show shortened version */
}

.ca-full {
    display: block;    /* always show full address */
}


/* -----------------------------------------------------------------------------
   TikTok Grid ("From the World" section)
----------------------------------------------------------------------------- */

.tt-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.tt-cell {
    flex: 1 1 300px;
    max-width: 340px;
    min-width: 280px;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    border: none;
    position: relative;
}

.tt-cell iframe {
    display: block;
    width: 100%;
    height: 680px;
    border: none;
    background: transparent;
}


/* -----------------------------------------------------------------------------
   Dexscreener Chart — Responsive Embed
----------------------------------------------------------------------------- */

.dex-embed-wrap {
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    position: relative;
    padding-bottom: 62%;       /* 16:10 aspect on desktop */
    min-height: 380px;
}

.dex-embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* -----------------------------------------------------------------------------
   Footer
----------------------------------------------------------------------------- */

.footer-logo {
    font-size: 38px;
    color: #fff;
    letter-spacing: 4px;
}

/* Contract Address label — smaller than logo, clearly subordinate */
.footer-ca-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.5;
    font-weight: 400;
    margin-bottom: 6px;
}

.social-icon a + a {
    margin-left: 15px;
}

/* Footer CA text — allow wrapping */
.footer-ca-text {
    word-break: break-all;
    overflow-wrap: anywhere;
    font-size: 13px;
    letter-spacing: 0.03em;
    line-height: 1.7;
    opacity: 0.7;
}


/* =============================================================================
   MOBILE STYLES — max-width: 768px
   Applied on phones. Do NOT touch on desktop.
============================================================================= */

@media (max-width: 768px) {

    /* -------------------------------------------------------------------------
       Global spacing
    ------------------------------------------------------------------------- */

    .section-padding {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .mt-100 {
        margin-top: 50px !important;
    }

    .mb-80 {
        margin-bottom: 40px !important;
    }

    .mt-80 {
        margin-top: 40px !important;
    }


    /* -------------------------------------------------------------------------
       Typography scale-down
    ------------------------------------------------------------------------- */

    h1, .header-cst .caption h1 {
        font-size: clamp(2rem, 10vw, 4rem) !important;
        line-height: 1.1 !important;
        letter-spacing: 0.05em !important;
    }

    h2 {
        font-size: clamp(1.6rem, 7vw, 3rem) !important;
        line-height: 1.2 !important;
    }

    h4, h5 {
        font-size: clamp(1rem, 4.5vw, 1.4rem) !important;
        line-height: 1.5 !important;
    }

    h6.fz-40 {
        font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
        line-height: 1.3 !important;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.65;
    }


    /* -------------------------------------------------------------------------
       Navbar — hide CA button on very small screens to save space
    ------------------------------------------------------------------------- */

    #copy-ca .ca-text {
        font-size: 0.75rem;
    }


    /* -------------------------------------------------------------------------
       Hero section
    ------------------------------------------------------------------------- */

    .header-cst .fit-img {
        height: 80vh !important;
        min-height: 400px;
    }

    .header-cst .caption {
        padding: 0 20px;
    }

    .header-cst .caption h4 {
        margin-top: 16px !important;
    }


    /* -------------------------------------------------------------------------
       Lore section
    ------------------------------------------------------------------------- */

    .intro-cst .col-lg-9 {
        width: 100%;
    }

    .intro-cst h5 {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 18px !important;
    }


    /* -------------------------------------------------------------------------
       Gallery — single column
    ------------------------------------------------------------------------- */

    .work-card .cards {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .work-card .card-item {
        width: 100% !important;
        max-width: 100% !important;
    }


    /* -------------------------------------------------------------------------
       How to Buy section
    ------------------------------------------------------------------------- */

    /* Section header row — stack $WORLD ticker below title */
    .services-cst .sec-head .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .services-cst .sec-head .ml-auto {
        margin-left: 0 !important;
    }

    .services-cst h6.fz-40 {
        font-size: 1.1rem !important;
    }

    /* Step items — stack number + content vertically */
    .services-cst .item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px;
        padding: 20px 0;
    }

    .services-cst .item .numb h6 {
        font-size: 0.85rem;
        opacity: 0.5;
    }

    .services-cst .item .title h2 {
        font-size: 1.5rem !important;
    }

    /* Contract Address display — break long string, always show full */
    .ca-display {
        font-size: 0.78rem !important;
        word-break: break-all !important;
        overflow-wrap: anywhere !important;
        line-height: 1.8 !important;
        letter-spacing: 0 !important;
        padding: 0 8px;
    }


    /* -------------------------------------------------------------------------
       TikTok grid — full width single column
    ------------------------------------------------------------------------- */

    .tt-grid {
        gap: 16px;
    }

    .tt-cell {
        flex: 1 1 100%;
        max-width: 100%;
        min-width: 0;
        border-radius: 12px;
    }

    .tt-cell iframe {
        height: 580px;
    }


    /* -------------------------------------------------------------------------
       Dexscreener — taller on mobile for readability
    ------------------------------------------------------------------------- */

    .dex-embed-wrap {
        padding-bottom: 0 !important;
        height: 540px;
        min-height: 0;
    }


    /* -------------------------------------------------------------------------
       Footer — centered, breathable, mobile-only
    ------------------------------------------------------------------------- */

    /* Stack all footer columns and center everything */
    .footer-sa .contact-info .row {
        flex-direction: column;
        align-items: center;
        gap: 0;                        /* handled per-col below */
    }

    .footer-sa .col-lg-4 {
        width: 100%;
        max-width: 480px;
        padding-left: 24px;
        padding-right: 24px;
        text-align: center !important;
    }

    /* Logo column */
    .footer-sa .col-lg-4:nth-child(1) {
        margin-bottom: 28px;
    }

    /* Contract address column */
    .footer-sa .col-lg-4:nth-child(2) {
        margin-bottom: 28px;
    }

    /* Social icons column */
    .footer-sa .col-lg-4:nth-child(3) {
        margin-bottom: 10px;
    }

    /* Center social icons row */
    .footer-sa .col-lg-4.d-flex {
        justify-content: center !important;
    }

    .footer-sa .social-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;                     /* generous gap between icons */
    }

    /* Remove sibling margin since gap handles spacing */
    .footer-sa .social-icon a + a {
        margin-left: 0;
    }

    /* Scale down logo slightly */
    .footer-logo {
        font-size: 28px;
        letter-spacing: 3px;
    }

    /* CA text — smaller, centered, wrappable */
    .footer-ca-text {
        font-size: 11px;
        padding: 0;
        text-align: center;
        line-height: 1.8;
        letter-spacing: 0.02em;
        opacity: 0.65;
    }

    /* Sub-footer copyright */
    .sub-footer .row {
        text-align: center;
        justify-content: center;
    }

    /* Prevent any overflow */
    .footer-sa {
        overflow-x: hidden;
    }

}


/* =============================================================================
   SMALL MOBILE — max-width: 480px (iPhones SE, small Android)
============================================================================= */

@media (max-width: 480px) {

    h1, .header-cst .caption h1 {
        font-size: clamp(1.8rem, 12vw, 3rem) !important;
    }

    .tt-cell iframe {
        height: 520px;
    }

    .dex-embed-wrap {
        height: 460px;
    }

    #copy-ca {
        padding: 8px 16px !important;
    }

}
