/* Recipe-card invite under the narration player (partials/app-cta.njk). Loaded only on posts that set app_cta.
   Only the paper (.app-cta-paper) is tilted; the heading, text and Apple's badge stay level on top of it.
   Apple's badge: native 120x40, shown at that size, never rotated, recoloured or stretched, with clear space of
   a quarter of its height (10px) on every side. Black on light backgrounds, white on dark. */

.app-cta {
    max-width: 720px;
    margin: 2.4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.app-cta-card {
    position: relative;
    isolation: isolate;
    padding: 3rem 2.4rem 1.8rem;
    color: #2b2b2b;
}

/* The tilted index card: dashed accent border and tape. The only ruled line is under the heading, never behind text. */
.app-cta-paper {
    position: absolute;
    inset: 0;
    z-index: -1;
    transform: rotate(-1deg);
    background-color: #fffdf6;
    border: 2px dashed var(--color-primary);
    border-radius: 6px;
    box-shadow: 3px 5px 0 rgba(0, 0, 0, .12);
}

.app-cta-paper::before { /* tape */
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 90px;
    height: 24px;
    margin-left: -45px;
    transform: rotate(3deg);
    background: rgba(255, 107, 53, .45);
}

.app-cta-title {
    margin: 0 0 1rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid rgba(80, 140, 200, .35);
    color: #2b2b2b;
    font-family: "Marker Felt", "Bradley Hand", "Segoe Print", var(--font-sans-serif);
    font-weight: 700;
    font-size: 2.3rem;
    line-height: 1.2;
}

.app-cta-box {
    color: var(--color-primary);
}

.app-cta-text {
    margin: 0 0 .8rem;
    color: #3a3a3a;
    font-size: 1.5rem;
    line-height: 1.5;
}

.app-cta-badge {
    display: inline-block;
    padding: 10px; /* Apple's clear space */
    line-height: 0;
}

.app-cta-badge img {
    height: 40px;
    width: auto;
}

.app-cta-badge-white,
[data-theme="dark"] .app-cta-badge-black {
    display: none;
}

[data-theme="dark"] .app-cta-badge-white {
    display: block;
}

.app-cta-badge:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 10px;
}

[data-theme="dark"] .app-cta-paper {
    background-color: #2a2622;
}

[data-theme="dark"] .app-cta-title {
    border-bottom-color: rgba(255, 255, 255, .18);
}

[data-theme="dark"] .app-cta-title {
    color: #f4efe6;
}

[data-theme="dark"] .app-cta-text {
    color: #d9d3c8;
}

@media (max-width: 768px) {
    .app-cta {
        margin: 2rem auto;
        padding: 0 2.2rem;
    }

    .app-cta-card {
        padding: 2.8rem 1.6rem 1.4rem;
    }

    .app-cta-title {
        font-size: 2.1rem;
    }
}
