/* Decorative airflow lives behind the existing photograph, never over copy. */
.airflow-ribbons {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.airflow-ribbons path {
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.airflow-navy { stroke: #6e8ab8; }
.airflow-blue { stroke: #3b93f4; }
.airflow-gold { stroke: #cc9f13; }

.airflow-line {
    opacity: .45;
    stroke-dasharray: 100 100;
    animation: jtp-airflow-draw 1.5s cubic-bezier(.2, .65, .25, 1) var(--ribbon-delay, 0s) both;
}

.airflow-ribbons .airflow-flow {
    opacity: 0;
    stroke-width: 2.1;
    stroke-dasharray: 14 86;
    animation: jtp-airflow-circulate var(--ribbon-duration, 19s) linear calc(1.5s + var(--ribbon-delay, 0s)) infinite both;
}

.airflow-ribbons.is-paused path { animation-play-state: paused; }

@keyframes jtp-airflow-draw {
    from { stroke-dashoffset: 100; opacity: 0; }
    to { stroke-dashoffset: 0; opacity: .45; }
}

@keyframes jtp-airflow-circulate {
    0% { stroke-dashoffset: 0; opacity: 0; }
    12% { opacity: .72; }
    88% { opacity: .72; }
    100% { stroke-dashoffset: -100; opacity: 0; }
}

/* The progress track is positioned within the existing sticky header. */
.reading-progress {
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
}

.reading-progress > span {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--brand, #c32639) 0 65%, var(--accent, #cc9f13));
    transform-origin: left center;
    transform: scaleX(var(--reading-progress, 0));
}

/* Entry choreography owns the card until its temporary animation clears. */
.effects-card { position: relative; }

@media (min-width: 961px) and (hover: hover) and (pointer: fine) {
    .effects-card.is-revealed:not(.motion-armed) {
        transition: transform .22s ease-out, box-shadow .25s, border-color .25s;
    }

    .effects-card.effects-active.is-revealed:not(.motion-armed) {
        transform: perspective(1100px) translateY(-4px) rotateX(var(--card-tilt-x, 0deg)) rotateY(var(--card-tilt-y, 0deg));
        box-shadow: 0 16px 38px #11265d12;
    }

    .effects-card::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 4;
        border-radius: inherit;
        pointer-events: none;
        opacity: 0;
        background: radial-gradient(330px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), #d4e8ff30, transparent 66%);
        transition: opacity .3s;
    }

    .effects-card.effects-active.is-revealed:not(.motion-armed)::after { opacity: 1; }

    .effects-parallax.is-revealed:not(.motion-armed) {
        translate: 0 var(--hero-scroll-shift, 0px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .airflow-ribbons, .reading-progress { display: none !important; }
    .effects-card.effects-active.is-revealed:not(.motion-armed) { transform: none !important; }
    .effects-card::after { display: none !important; }
    .effects-parallax.is-revealed:not(.motion-armed) { translate: none !important; }
}

@media print {
    .airflow-ribbons, .reading-progress { display: none !important; }
    .airflow-ribbons path { animation: none !important; }
    .effects-card.effects-active.is-revealed:not(.motion-armed) { transform: none !important; box-shadow: none !important; }
    .effects-card::after { display: none !important; }
    .effects-parallax { translate: none !important; }
}
