/*
|--------------------------------------------------------------------------
| JCR download page
|--------------------------------------------------------------------------
*/

body.af-jcr-page {
    margin: 0;
    min-height: 100vh;
    color: var(--af-text, #f4f7fb);
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(34, 211, 238, 0.12),
            transparent 28rem
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(139, 92, 246, 0.13),
            transparent 32rem
        ),
        var(--af-bg, #07111f);
}

.af-jcr-main,
.af-jcr-article {
    width: 100%;
    min-width: 0;
}

.af-jcr-container {
    width: min(calc(100% - 40px), 1120px);
    margin-inline: auto;
}

/*
|--------------------------------------------------------------------------
| Compact hero
|--------------------------------------------------------------------------
*/

.af-jcr-hero {
    padding: 34px 0;
    border-bottom: 1px solid
        var(--af-border, rgba(255, 255, 255, 0.11));
    text-align: center;
}

.af-jcr-kicker,
.af-jcr-section-label {
    margin: 0 0 9px;
    color: var(--af-primary, #67e8f9);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.af-jcr-hero h1 {
    margin: 0 0 12px;
    color: var(--af-text, #f4f7fb);
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.055em;
    overflow-wrap: anywhere;
}

.af-jcr-intro {
    max-width: 680px;
    margin: 0 auto;
    color: var(--af-muted, #a9b5c8);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.af-jcr-content {
    padding: 48px 0 76px;
}

.af-jcr-editor-content {
    max-width: 820px;
    margin: 0 auto 42px;
    color: var(--af-muted, #a9b5c8);
}

/*
|--------------------------------------------------------------------------
| Section heading
|--------------------------------------------------------------------------
*/

.af-jcr-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.af-jcr-section-heading h2,
.af-jcr-all-files h2,
.af-jcr-empty h2 {
    margin: 0;
    color: var(--af-text, #f4f7fb);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.af-jcr-download-all {
    flex: 0 0 auto;
    color: var(--af-primary, #67e8f9);
    font-weight: 800;
    text-decoration: none;
}

.af-jcr-download-all:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/*
|--------------------------------------------------------------------------
| Download cards
|--------------------------------------------------------------------------
*/

.af-jcr-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.af-jcr-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 270px;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    padding: 25px;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.065),
            rgba(255, 255, 255, 0.035)
        );
    border: 1px solid
        var(--af-border, rgba(255, 255, 255, 0.11));
    border-radius: var(--af-radius, 20px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12);
    transition:
        transform 170ms ease,
        border-color 170ms ease,
        background-color 170ms ease,
        box-shadow 170ms ease;
}

/*
 * Thin accent line shown on hover and keyboard focus.
 */
.af-jcr-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    content: "";
    background: linear-gradient(
        90deg,
        var(--af-primary, #67e8f9),
        var(--af-secondary, #a78bfa),
        var(--af-green, #6ee7b7)
    );
    opacity: 0;
    transform: scaleX(0.35);
    transform-origin: left;
    transition:
        opacity 170ms ease,
        transform 170ms ease;
}

.af-jcr-card:hover,
.af-jcr-card:focus-within {
    background-color: rgba(255, 255, 255, 0.075);
    border-color: rgba(103, 232, 249, 0.34);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.af-jcr-card:hover::before,
.af-jcr-card:focus-within::before {
    opacity: 1;
    transform: scaleX(1);
}

.af-jcr-year {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 18px;
    padding: 6px 11px;
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary, #67e8f9),
        var(--af-green, #6ee7b7)
    );
    border-radius: 999px;
    box-shadow: 0 7px 20px rgba(103, 232, 249, 0.12);
    font-size: 0.76rem;
    font-weight: 900;
}

.af-jcr-card h3 {
    margin: 0 0 11px;
    color: var(--af-text, #f4f7fb);
    font-size: 1.25rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.af-jcr-card p {
    margin: 0;
    color: var(--af-muted, #a9b5c8);
    font-size: 0.91rem;
}

/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.af-jcr-button,
.af-jcr-all-buttons a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    color: #041019;
    background: linear-gradient(
        135deg,
        var(--af-primary, #67e8f9),
        var(--af-green, #6ee7b7)
    );
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 7px 20px rgba(103, 232, 249, 0.12);
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.af-jcr-button:hover,
.af-jcr-button:focus-visible,
.af-jcr-all-buttons a:hover,
.af-jcr-all-buttons a:focus-visible {
    color: #041019;
    box-shadow: 0 9px 26px rgba(103, 232, 249, 0.22);
    transform: translateY(-2px);
}

.af-jcr-button:focus-visible,
.af-jcr-all-buttons a:focus-visible {
    outline: 3px solid var(--af-primary, #67e8f9);
    outline-offset: 3px;
}

/*
 * Disabled cards retain the visual shape without behaving like links.
 */
.af-jcr-unavailable {
    color: var(--af-muted, #a9b5c8);
    background: rgba(255, 255, 255, 0.055);
    border-color:
        var(--af-border, rgba(255, 255, 255, 0.11));
    box-shadow: none;
    cursor: default;
}

/*
|--------------------------------------------------------------------------
| All-links panel
|--------------------------------------------------------------------------
*/

.af-jcr-all-files {
    margin-top: 50px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid
        var(--af-border, rgba(255, 255, 255, 0.11));
    border-radius: var(--af-radius, 20px);
}

.af-jcr-all-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.af-jcr-note {
    margin: 18px 0 0;
    color: var(--af-dim, #8190a5);
    font-size: 0.82rem;
}

.af-jcr-empty {
    padding: 30px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid
        var(--af-border, rgba(255, 255, 255, 0.11));
    border-radius: var(--af-radius, 20px);
}

/*
|--------------------------------------------------------------------------
| Responsive layout
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {
    .af-jcr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .af-jcr-container {
        width: min(calc(100% - 28px), 1120px);
    }

    .af-jcr-hero {
        padding: 24px 0;
    }

    .af-jcr-content {
        padding: 36px 0 62px;
    }

    .af-jcr-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .af-jcr-grid {
        grid-template-columns: 1fr;
    }

    .af-jcr-card {
        min-height: 0;
        padding: 22px;
    }

    .af-jcr-all-files {
        padding: 22px;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    .af-jcr-card,
    .af-jcr-card::before,
    .af-jcr-button,
    .af-jcr-all-buttons a {
        transition: none;
    }

    .af-jcr-card:hover,
    .af-jcr-card:focus-within,
    .af-jcr-button:hover,
    .af-jcr-button:focus-visible,
    .af-jcr-all-buttons a:hover,
    .af-jcr-all-buttons a:focus-visible {
        transform: none;
    }
}