/*
 * App promo - ONE component, six placements (SEO spec 2026-10-14, B1-B6 and C).
 * Markup: includes/app-promo.blade.php. Copy and gates: App\Support\AppPromo.
 *
 *   --showcase  home                      wide navy band, copy + CTA, the app's real screens (two on desktop, one on mobile)
 *   --card      stock filter, calculators the app icon + copy + CTA (--compact on stock and calculator pages)
 *   --banner    market pages, gold, forex a light strip with an accent edge; a screenshot only if one is configured
 *
 * Static on purpose: no popup, no sticky or fixed positioning, no animation, no script. Images carry their own
 * width/height in the markup, so the box is reserved before the file arrives (CLS). Logical properties throughout.
 */

.app-promo {
    margin-block: var(--space-8);
    font-family: var(--font-primary);
    color: var(--text);
}

.app-promo__box {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-5);
    border: 1px solid var(--teal-border);
    border-radius: var(--radius-lg);
    background: var(--teal-bg);
    box-shadow: var(--shadow-sm);
}

.app-promo__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.app-promo__icon {
    flex: none;
    display: grid;
    place-items: center;
    inline-size: 52px;
    block-size: 52px;
    border-radius: var(--radius-md);
    background: var(--navy);
    color: var(--gold-light);
}

.app-promo__copy {
    min-inline-size: 0;
}

.app-promo__eyebrow {
    margin: 0 0 var(--space-1);
    font-size: 0.8125rem;
    font-weight: var(--font-extrabold);
    color: var(--teal);
}

.app-promo__title {
    margin: 0 0 var(--space-2);
    font-size: clamp(1.125rem, 1rem + 0.6vi, 1.4rem);
    font-weight: var(--font-black);
    line-height: 1.5;
    color: var(--navy);
}

.app-promo__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.85;
    color: var(--text-mid);
}

.app-promo__features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
}

.app-promo__features li {
    padding: 6px 14px;
    border: 1px solid var(--header-separator-on-dark);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8125rem;
    font-weight: var(--font-bold);
    color: var(--text-on-navy);
}

.app-promo__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    align-self: stretch;
    min-block-size: 44px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: var(--teal);
    color: var(--text-on-navy);
    font-size: 0.9375rem;
    font-weight: var(--font-extrabold);
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

/* The arrow is drawn, not typed: the link's text stays exactly the label, and the empty alt keeps screen readers off the glyph. */
.app-promo__cta::after {
    content: "←" / "";
}

.app-promo__cta:hover,
.app-promo__cta:focus-visible {
    background: var(--navy);
    color: var(--text-on-navy);
}

.app-promo__cta:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

.app-promo__media {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.app-promo__shot {
    flex: 0 1 200px;
    min-inline-size: 0;
    margin: 0;
}

.app-promo__shot img {
    display: block;
    inline-size: 100%;
    block-size: auto;
    border: 4px solid var(--bg-subtle);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

/* ── compact: the stock and calculator cards sit among data, so they are small ── */
.app-promo--compact .app-promo__box {
    padding: var(--space-4);
}

.app-promo--compact .app-promo__icon {
    inline-size: 44px;
    block-size: 44px;
}

.app-promo--compact .app-promo__title {
    font-size: 1.05rem;
}

.app-promo--compact .app-promo__text {
    font-size: 0.875rem;
    line-height: 1.75;
}

/* ── banner: lighter than a card, with an accent edge instead of a tinted fill ── */
.app-promo--banner .app-promo__box {
    background: var(--bg-card);
    border-color: var(--border);
    border-inline-start: 4px solid var(--teal);
}

/* ── showcase: the home band ── */
.app-promo--showcase .app-promo__box {
    padding: var(--space-6);
    border-color: transparent;
    background: var(--hero-bg-dark-gradient);
    box-shadow: var(--shadow-lg);
}

.app-promo--showcase .app-promo__eyebrow {
    color: var(--gold-light);
}

.app-promo--showcase .app-promo__title {
    color: var(--text-on-navy);
}

.app-promo--showcase .app-promo__text {
    color: var(--text-on-navy-muted);
}

.app-promo--showcase .app-promo__cta {
    align-self: flex-start;
    background: var(--gold-light);
    color: var(--navy);
}

.app-promo--showcase .app-promo__cta:hover,
.app-promo--showcase .app-promo__cta:focus-visible {
    background: var(--gold);
    color: var(--navy);
}

.app-promo--showcase .app-promo__cta:focus-visible {
    outline-color: var(--gold-light);
}

/* Mobile: copy and button first, then ONE large phone - the second screen is not shown (and, being lazy, not fetched). */
.app-promo--showcase .app-promo__shot {
    flex-basis: 230px;
}

.app-promo--showcase .app-promo__shot:not(:first-child) {
    display: none;
}

@media (min-width: 768px) {
    .app-promo__main {
        flex-direction: row;
        align-items: center;
        gap: var(--space-5);
    }

    .app-promo__copy {
        flex: 1 1 auto;
    }

    .app-promo__cta {
        flex: none;
        align-self: center;
    }

    .app-promo__box {
        padding: var(--space-6);
    }

    .app-promo--compact .app-promo__box {
        padding: var(--space-5);
    }

    .app-promo--banner .app-promo__box {
        flex-direction: row;
        align-items: center;
    }

    .app-promo--banner .app-promo__main {
        flex: 1 1 auto;
    }

    .app-promo--banner .app-promo__media {
        flex: 0 0 132px;
    }

    .app-promo--showcase .app-promo__box {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-8);
        padding: var(--space-10);
    }

    .app-promo--showcase .app-promo__main {
        flex: 1 1 54%;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .app-promo--showcase .app-promo__copy {
        flex: none;
    }

    .app-promo--showcase .app-promo__cta {
        align-self: flex-start;
    }

    .app-promo--showcase .app-promo__media {
        flex: 0 1 42%;
    }

    .app-promo--showcase .app-promo__shot {
        flex-basis: 190px;
    }

    .app-promo--showcase .app-promo__shot:not(:first-child) {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-promo__cta {
        transition: none;
    }
}

@media print {
    .app-promo {
        display: none;
    }
}
