/* ============================================================
   YoungME — Mobile Polish (v2)
   ------------------------------------------------------------
   Additive stylesheet, only active below 768px.

   Goal: keep the brand identity (dark navy gradient, white photo
   card, white text) while addressing the mobile UX issues:
   tight spacing, strong hierarchy, prominent CTAs, polished
   cards, calmer colors elsewhere, compact footer.

   Rolls back trivially: remove the <link> in base.html.
   ============================================================ */

@media (max-width: 768px) {

    /* ╔════════════════════════════════════════════════════╗
       ║ HERO — premium, dark navy, compact                 ║
       ╚════════════════════════════════════════════════════╝ */

    .home-hero {
        /* Slightly richer gradient with a touch of purple for warmth.
           Background patterns for visual texture without competing
           with content. */
        background:
            radial-gradient(ellipse 600px 400px at 80% 0%,
                rgba(96, 165, 250, 0.18), transparent 60%),
            radial-gradient(ellipse 500px 300px at 0% 100%,
                rgba(99, 102, 241, 0.12), transparent 55%),
            linear-gradient(160deg, #001f4d 0%, #003b7a 45%, #0052a8 100%) !important;
        color: #fff !important;
        padding: 2rem 0 2.25rem !important;
        position: relative;
        overflow: hidden !important;
    }

    /* Subtle dot grid texture, top-right */
    .home-hero::before {
        content: "";
        position: absolute;
        top: -20px;
        right: -20px;
        width: 200px;
        height: 200px;
        background-image: radial-gradient(circle, rgba(255, 255, 255, 0.10) 1px, transparent 1.5px);
        background-size: 14px 14px;
        opacity: 0.5;
        pointer-events: none;
    }

    /* Soft glow at the bottom-left to anchor the visual weight */
    .home-hero::after {
        content: "";
        position: absolute;
        bottom: -40px;
        left: -40px;
        width: 220px;
        height: 220px;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
        pointer-events: none;
    }

    .home-hero__inner {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 0 1.1rem !important;
        min-height: 0 !important;
        position: relative;
        z-index: 2;
    }

    .home-hero__copy {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .home-hero__kicker {
        font-size: 0.7rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.18em !important;
        text-transform: uppercase !important;
        color: rgba(173, 216, 255, 0.85) !important;
        margin-bottom: 0.85rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.35rem 0.7rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-radius: 100px !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .home-hero__title {
        font-size: clamp(1.85rem, 7vw, 2.3rem) !important;
        font-weight: 800 !important;
        line-height: 1.12 !important;
        letter-spacing: -0.022em !important;
        color: #fff !important;
        margin-bottom: 0.85rem !important;
        /* Subtle gradient on title for premium feel */
        background: linear-gradient(180deg, #ffffff 0%, #d1e3ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .home-hero__lead {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        color: rgba(210, 225, 255, 0.92) !important;
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }

    /* CTAs — primary stays white-on-blue (reads as cross-card brand
       button), outline becomes a subtle glassy chip with a thin border. */
    .home-hero__actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.65rem !important;
        margin-top: 1.4rem !important;
    }

    .home-hero__btn {
        min-height: 50px !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .home-hero__btn--primary {
        background: #ffffff !important;
        color: #003b7a !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.4) inset,
            0 8px 24px -6px rgba(0, 0, 0, 0.35) !important;
    }
    .home-hero__btn--primary:active {
        transform: translateY(1px);
    }

    .home-hero__btn--outline {
        background: rgba(255, 255, 255, 0.08) !important;
        color: #fff !important;
        border: 1px solid rgba(255, 255, 255, 0.32) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* ── Photo card column ─────────────────────────────── */
    .home-hero__visual {
        flex: 1 1 auto !important;
        max-width: 100% !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        position: relative !important;
        margin-top: 0.5rem;
    }

    .home-hero__photo-card {
        width: min(78%, 280px) !important;
        max-width: 280px !important;
        height: 220px !important;
        border-radius: 18px !important;
        background: #fff !important;
        box-shadow:
            0 24px 48px -12px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(255, 255, 255, 0.08) !important;
        position: relative;
        z-index: 2;
    }

    .home-hero__portrait-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
        border-radius: 18px !important;
    }

    /* Talent badge stays on the photo card — it's a signature element */
    .home-hero__talent-badge {
        bottom: 0.7rem !important;
        left: 0.7rem !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
        gap: 0.4rem !important;
    }

    .home-hero__talent-badge-icon {
        width: 22px !important;
        height: 22px !important;
    }

    /* Decorative deco circles: keep one as a small accent behind the photo */
    .home-hero__deco-circle--lg {
        display: none !important;
    }
    .home-hero__deco-circle--sm {
        width: 90px !important;
        height: 90px !important;
        right: 8% !important;
        top: -10px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
    }
    .home-hero__dots {
        display: none !important;
    }

    /* ── Trust badges: glassy chips below the photo ───── */
    .home-hero__badges {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.55rem !important;
        margin-top: 1.5rem !important;
        padding: 1rem 0 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
    }

    .home-hero__badge {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.45rem !important;
        padding: 0.7rem 0.45rem !important;
        background: rgba(255, 255, 255, 0.07) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        border-radius: 12px !important;
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        color: #ebf3ff !important;
        line-height: 1.25 !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .home-hero__badge-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        background: rgba(255, 255, 255, 0.18) !important;
        border-radius: 9px !important;
    }

    /* ╔════════════════════════════════════════════════════╗
       ║ SECTIONS                                           ║
       ╚════════════════════════════════════════════════════╝ */

    .home-section,
    .home-trust,
    .home-accessibility-band {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }

    .home-section__heading {
        margin-bottom: 1.25rem !important;
    }

    .home-section__eyebrow {
        font-size: 0.7rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.16em !important;
        text-transform: uppercase !important;
        color: #2563eb !important;
        margin-bottom: 0.45rem !important;
        display: inline-block;
        padding: 0.25rem 0.7rem;
        background: #eff6ff;
        border-radius: 100px;
    }

    .home-section__title {
        font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
        font-weight: 800 !important;
        line-height: 1.18 !important;
        letter-spacing: -0.018em !important;
        color: #0f172a !important;
        margin-bottom: 0.6rem !important;
    }

    .home-section__lead {
        font-size: 0.94rem !important;
        line-height: 1.6 !important;
        color: #475569 !important;
    }

    /* The mid-page full-bleed gradient banner — keep the white→blue
       gradient defined inline on the section (looks intentional and
       lets the dark text stay readable). Just compact the padding. */
    section[style*="linear-gradient(135deg, #ffffff"] {
        padding: 1.5rem 0 !important;
    }

    .home-accessibility-band {
        background: linear-gradient(135deg, #f1f5f9 0%, #e0eaff 100%) !important;
    }

    /* ╔════════════════════════════════════════════════════╗
       ║ STEP CARDS                                         ║
       ╚════════════════════════════════════════════════════╝ */

    .home-steps {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .home-step-card {
        position: relative !important;
        padding: 1.15rem 1.1rem 1.15rem 1.4rem !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
        overflow: hidden !important;
    }

    .home-step-card::before {
        content: "";
        position: absolute;
        top: 0; bottom: 0; left: 0;
        width: 4px;
        background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
    }

    /* Numbered step cards with a colored badge on the icon */
    .home-step-card:nth-child(1) .home-step-card__icon { background: #dbeafe !important; color: #1e40af !important; }
    .home-step-card:nth-child(2) .home-step-card__icon { background: #fef3c7 !important; color: #92400e !important; }
    .home-step-card:nth-child(3) .home-step-card__icon { background: #d1fae5 !important; color: #065f46 !important; }

    .home-step-card__icon {
        width: 44px !important;
        height: 44px !important;
        border-radius: 11px !important;
        margin-bottom: 0.7rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .home-step-card__title {
        font-size: 1.02rem !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin-bottom: 0.3rem !important;
        line-height: 1.3 !important;
    }

    .home-step-card__text {
        font-size: 0.88rem !important;
        line-height: 1.55 !important;
        color: #475569 !important;
    }

    .home-step-card__arrow {
        right: 0.85rem !important;
        bottom: 0.85rem !important;
        width: 36px !important;
        height: 36px !important;
        background: #1e3a8a !important;
        color: #fff !important;
    }

    /* ╔════════════════════════════════════════════════════╗
       ║ OFFER CARDS                                        ║
       ╚════════════════════════════════════════════════════╝ */

    .home-offer-card {
        padding: 1.2rem !important;
        border-radius: 16px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 2px 6px -2px rgba(15, 23, 42, 0.06) !important;
        background: #fff !important;
    }

    .home-offer-card--cta {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important;
        color: #fff !important;
        border: none !important;
    }
    .home-offer-card--cta__btn {
        width: 100% !important;
        min-height: 46px !important;
        font-weight: 700 !important;
        background: #fff !important;
        color: #1e3a8a !important;
        border-radius: 10px !important;
    }

    /* ╔════════════════════════════════════════════════════╗
       ║ TYPOGRAPHY GLOBAL                                  ║
       ╚════════════════════════════════════════════════════╝ */

    .text-secondary,
    .text-muted {
        color: #475569 !important;
    }

    /* ╔════════════════════════════════════════════════════╗
       ║ FOOTER — compact                                   ║
       ╚════════════════════════════════════════════════════╝ */

    .base-footer__body,
    .home-footer {
        padding: 1.75rem 0 !important;
    }

    .base-footer__grid,
    .home-footer__grid {
        gap: 1.5rem !important;
    }

    .base-footer__col-title,
    .home-footer__label {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.06em !important;
        text-transform: uppercase !important;
        color: #1e3a8a !important;
        margin-bottom: 0.6rem !important;
    }

    .base-footer__list a,
    .home-footer__list a,
    .home-footer__contact-item {
        font-size: 0.88rem !important;
        line-height: 1.55 !important;
    }

    .base-footer__brand-text,
    .home-footer__desc {
        font-size: 0.85rem !important;
        line-height: 1.55 !important;
        color: #475569 !important;
    }

    .base-footer__support-card {
        padding: 1rem !important;
        gap: 0.75rem !important;
        border-radius: 12px !important;
    }

    .base-footer__support-btn {
        width: 100% !important;
        min-height: 44px !important;
        font-weight: 700 !important;
        border-radius: 10px !important;
    }

    .base-footer__bottom,
    .home-footer__bottom {
        padding: 0.85rem 0 !important;
        font-size: 0.75rem !important;
    }

    /* Topbar institutional banner: hide on mobile to save vertical space */
    .youngme-topbar {
        display: none !important;
    }
}

/* ── Extra-small phones (≤ 380px) ─────────────────────── */
@media (max-width: 380px) {
    .home-hero__title {
        font-size: 1.65rem !important;
    }
    .home-hero__actions {
        grid-template-columns: 1fr !important;
    }
    .home-hero__photo-card {
        height: 200px !important;
        width: 90% !important;
    }
    .home-hero__badges {
        grid-template-columns: 1fr !important;
    }
    .home-hero__badge {
        flex-direction: row !important;
        text-align: left !important;
        padding: 0.7rem 0.85rem !important;
    }
}
