/* ==========================================================
   EquiVest homepage - app feel (loaded last, overrides inline styles)
   ========================================================== */
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{ -webkit-tap-highlight-color:transparent; -webkit-font-smoothing:antialiased; }
.btn-hero-primary:active,.btn-hero-secondary:active,.nav-btn-register:active{ transform:scale(.97); }

/* soften the glow blobs so they fade out instead of ending in a hard vertical edge */
.hero::before,.stats-bar::before,.crypto-showcase::before,.forex-showcase::before,.steps-section::before,
#features::before,#features::after,.trust-section::before,.trust-section::after,
.testimonials-section::before,.testimonials-section::after{
    -webkit-mask-image:radial-gradient(closest-side,#000 35%,transparent 100%);
    mask-image:radial-gradient(closest-side,#000 35%,transparent 100%);
}

/* scroll progress bar under the nav (added by home-app.js) */
.app-progress{ position:fixed; left:0; top:0; height:3px; width:100%; z-index:2000; pointer-events:none; }
.app-progress i{ display:block; height:100%; width:100%; transform-origin:0 50%; transform:scaleX(0); background:linear-gradient(90deg,#d4a017,#f3c64a); }

/* bottom dock: hidden on desktop */
.app-dock{ display:none; }

/* tap ripple used by home-app.js */
.h-rip{ position:absolute; border-radius:50%; background:rgba(255,255,255,.4); transform:scale(0); animation:hRipple .6s ease-out forwards; pointer-events:none; }
@keyframes hRipple{ to{ transform:scale(2.6); opacity:0; } }
.btn-hero-primary,.btn-hero-secondary,.nav-btn-register,.dock-cta,.dock-login{ position:relative; overflow:hidden; }

@media (max-width:768px){

    body{ padding-bottom:calc(86px + env(safe-area-inset-bottom,0px)); background:#0a0a0a; }

    /* ----- top app bar ----- */
    .home-nav{
        padding:calc(10px + env(safe-area-inset-top,0px)) 16px 10px;
        background:rgba(10,10,10,.82);
        -webkit-backdrop-filter:saturate(180%) blur(16px);
        backdrop-filter:saturate(180%) blur(16px);
        border-bottom:1px solid rgba(255,255,255,.06);
    }
    .home-nav.scrolled{ padding:calc(8px + env(safe-area-inset-top,0px)) 16px 8px; }
    .home-nav .logo{ font-size:16px; }
    .nav-btn-login{ padding:8px 12px; font-size:13px; border-radius:10px; }
    .nav-btn-register{ padding:9px 14px; font-size:13px; border-radius:12px; }

    /* ----- hero ----- */
    .hero{
        flex-direction:column;
        align-items:stretch;
        flex-wrap:nowrap;
        padding:34px 20px 54px;
        gap:30px;
        border-radius:0 0 30px 30px;
    }
    .hero-text{ min-width:0; width:100%; flex:none; }
    .hero-text h1{ font-size:37px; line-height:1.1; margin-bottom:14px; }
    .hero-text p{ font-size:15px; line-height:1.6; margin-bottom:22px; max-width:none; }
    .hero-cta{ gap:10px; flex-wrap:nowrap; }
    .hero-cta a{ flex:1 1 0; min-width:0; text-align:center; justify-content:center; padding:15px 10px; border-radius:16px; font-size:15px; }
    .hero-visual{ min-width:0; width:100%; flex:none; }
    .hero-card{ width:100%; max-width:380px; border-radius:24px; padding:20px; }
    .hero-visual .dc-btc{ width:44px; height:44px; font-size:18px; top:-10%; right:2%; }
    .hero-visual .dc-eth{ width:32px; height:32px; font-size:14px; bottom:4%; left:0; }

    /* ----- stats become a floating card ----- */
    .stats-bar{
        margin:-26px 14px 0;
        position:relative;
        z-index:3;
        border-radius:24px;
        padding:20px 8px;
        grid-template-columns:1fr 1fr;
        gap:6px 0;
        background:#141311;
        border:1px solid rgba(212,160,23,.18);
        box-shadow:0 18px 40px rgba(0,0,0,.35);
    }
    .stats-bar .stat{ border-right:none; padding:10px 8px; }
    .stats-bar .stat:nth-child(odd){ border-right:1px solid rgba(255,255,255,.07); }
    .stats-bar .stat h3{ font-size:24px; }

    /* ----- sections slide over each other like sheets ----- */
    .confidence-section,.crypto-showcase,.forex-showcase,.steps-section,
    .live-market-section,.testimonials-section,.trust-section,.cta-section{
        border-radius:28px 28px 0 0;
        margin-top:-24px;
        position:relative;
        padding-top:62px;
    }
    .confidence-section{ margin-top:22px; }
    #features{ border-radius:28px 28px 0 0; margin-top:-24px; background:#0e0e0e; padding-top:62px; position:relative; }
    .section-header{ margin-bottom:24px; }
    .section-header h2{ font-size:28px; }

    /* ----- stats tiles inside "Trade with confidence" ----- */
    .confidence-stats-box{ padding:22px 14px; gap:14px 10px; grid-template-columns:1fr 1fr; border-radius:22px; }
    .confidence-stat .stat-number{ font-size:30px; }

    /* ----- swipeable card rows (features + why us) ----- */
    .features-grid,.trust-grid{
        display:flex !important;
        overflow-x:auto;
        scroll-snap-type:x mandatory;
        gap:14px;
        padding:6px 20px 18px !important;
        margin:0 -0px;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
        perspective:none;
    }
    .features-grid::-webkit-scrollbar,.trust-grid::-webkit-scrollbar{ display:none; }
    .feature-card,.trust-card{
        flex:0 0 76%;
        scroll-snap-align:center;
        border-radius:24px;
        padding:26px 22px;
        transform:none !important;
    }
    #features > .features-grid{ max-width:none; }
    .trust-grid{ padding-left:20px !important; padding-right:20px !important; }

    /* ----- steps as a stacked list ----- */
    .steps-grid{ gap:12px; margin-top:26px; text-align:left; }
    .step-card{ display:grid; grid-template-columns:56px 1fr; column-gap:14px; align-items:start; padding:20px 18px; border-radius:22px; }
    .step-card .step-number{ grid-row:1 / span 2; font-size:34px; margin:0; color:#d4a017; line-height:1; }
    .step-card h3{ font-size:17px; margin:0 0 4px; }
    .step-card:hover{ transform:none; }

    /* ----- testimonials ----- */
    .testimonial-card{ border-radius:22px; }

    /* ----- market box / phone / forex ----- */
    .market-visual-box{ padding:20px; border-radius:24px; margin-top:28px; }
    #liveCandleCanvas{ height:190px; }
    .forex-visual{ width:100%; max-width:360px; }

    /* ----- call to action ----- */
    .cta-section{ padding:62px 22px 56px; }
    .cta-section .btn-hero-primary{ width:100%; justify-content:center; padding:17px; border-radius:18px; }

    /* ----- footer ----- */
    .home-footer{ padding:40px 22px 24px; }
    .footer-top{ gap:26px; }

    /* ----- bottom dock (primary actions, like an app) ----- */
    .app-dock{
        display:flex;
        gap:10px;
        position:fixed;
        left:12px;
        right:12px;
        bottom:calc(12px + env(safe-area-inset-bottom,0px));
        z-index:1500;
        padding:10px;
        border-radius:24px;
        background:rgba(10,10,10,.9);
        -webkit-backdrop-filter:saturate(180%) blur(18px);
        backdrop-filter:saturate(180%) blur(18px);
        border:1px solid rgba(255,255,255,.1);
        box-shadow:0 20px 50px rgba(0,0,0,.45);
        transform:translateY(140%);
        transition:transform .45s cubic-bezier(.2,.9,.2,1);
    }
    .app-dock.show{ transform:none; }
    .app-dock a{ display:flex; align-items:center; justify-content:center; height:50px; border-radius:16px; font-weight:800; font-size:15px; text-decoration:none; }
    .dock-login{ flex:0 0 32%; color:#fff; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); }
    .dock-cta{ flex:1; color:#1a1400; background:linear-gradient(135deg,#d4a017,#a67d10); box-shadow:0 8px 20px rgba(212,160,23,.35); }
    .dock-cta i{ margin-left:8px; font-size:13px; }

    /* cookie notice becomes a floating card */
    .cookie-banner{ left:12px !important; right:12px !important; bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important; width:auto !important; border-radius:22px; padding:16px 18px !important; gap:12px !important; }
    .cookie-banner p{ font-size:12.5px !important; }

    /* chat bubble sits above the dock */
    body .support-bubble{ bottom:calc(92px + env(safe-area-inset-bottom,0px)); right:14px; width:50px; height:50px; font-size:21px; }
    body .support-panel{ bottom:calc(152px + env(safe-area-inset-bottom,0px)); right:10px; left:10px; width:auto; max-width:none; }
}

@media (max-width:380px){
    .hero-text h1{ font-size:32px; }
    .feature-card,.trust-card{ flex-basis:84%; }
}

@media (prefers-reduced-motion:no-preference) and (max-width:768px){
    .hero-text > *{ animation:hUp .6s cubic-bezier(.2,.8,.2,1) both; }
    .hero-text h1{ animation-delay:.05s; }
    .hero-text p{ animation-delay:.14s; }
    .hero-cta{ animation-delay:.22s; }
    .stats-bar{ animation:hUp .6s .3s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes hUp{ from{ opacity:0; transform:translateY(18px); } to{ opacity:1; transform:none; } }