/*
 * The Features page -- the plan docs/_plan-fable-features-page-2026-11-04.md, drawn on the approved canvas
 * `design/features/` (owner, 2026-11-04).
 *
 * A STATIC SHEET, like the press page's, so the page looks right without waiting for a rebuild of the asset bundle.
 * TOKENS ONLY: every colour is a `var(--color-*)` of resources/css/app.css (docs/ui-spec.md section 5c). Phone first;
 * `min-width: 1024px` adds the rail and the two columns. No glow, no 3D, no all-caps but the tiny eyebrows (owner).
 * The reveal runs only when `features-page.js` has set `.fx-js`: with no script every word is simply there.
 */

.fx {
    --fx-display: 'Barlow Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
    --fx-lift: color-mix(in srgb, var(--color-ink) 22%, transparent);
    margin-inline: auto;
    max-width: 74rem;
    padding-bottom: 8px;
}

.fx-eyebrow {
    align-items: center;
    color: var(--color-accent);
    display: flex;
    font-size: 11px;
    font-weight: 600;
    gap: 10px;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.fx-eyebrow .fx-n {
    color: var(--color-soft-ink);
}

.fx-tag {
    border: 1px solid var(--color-ink);
    border-radius: 3px;
    color: var(--color-ink);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 3px 5px 2px;
}

.fx h1,
.fx h2,
.fx h3 {
    font-family: var(--fx-display);
    font-weight: 700;
    text-wrap: balance;
}

.fx h1 {
    color: var(--color-ink);
    font-size: 44px;
    letter-spacing: 0.005em;
    line-height: 1;
    margin: 14px 0 0;
}

.fx-lede {
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.45;
    margin: 12px 0 0;
    max-width: 30em;
    text-wrap: pretty;
}

.fx h2 {
    color: var(--color-ink);
    font-size: 36px;
    letter-spacing: 0.005em;
    line-height: 1.02;
    margin: 12px 0 0;
}

.fx-p {
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
    max-width: 34em;
    text-wrap: pretty;
}

.fx-fact {
    color: var(--color-ink);
    font-weight: 600;
}

.fx-link {
    align-items: center;
    border-bottom: 1px solid transparent;
    color: var(--color-accent);
    display: inline-flex;
    font-size: 15px;
    font-weight: 600;
    gap: 6px;
    line-height: 1.2;
    margin-top: 4px;
    padding-bottom: 1px;
    text-decoration: none;
    width: fit-content;
}

.fx-link:hover {
    border-color: var(--color-accent);
}

.fx-head {
    padding-top: 26px;
}

/* The in-page index: a numbered two-column list that fits 390 px. */
.fx-index ol {
    column-gap: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
}

.fx-index a {
    align-items: baseline;
    border-top: 1px solid var(--color-subtle);
    color: var(--color-ink);
    display: flex;
    font-size: 15px;
    font-weight: 600;
    gap: 10px;
    line-height: 1.2;
    padding: 11px 0 10px;
    text-decoration: none;
}

.fx-index li:nth-child(-n + 2) a {
    border-top-color: var(--color-ink);
}

.fx-index a .fx-k {
    color: var(--color-soft-ink);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    min-width: 18px;
}

.fx-index a:hover .fx-t {
    color: var(--color-accent);
}

.fx-taken {
    color: var(--color-soft-ink);
    font-size: 12px;
    line-height: 1.3;
    margin: 6px 0 0;
}

/* A section: eyebrow, title, the screens, the words. */
.fx-sec {
    border-top: 1px solid var(--color-subtle);
    display: flex;
    flex-direction: column;
    padding: 44px 0 40px;
    scroll-margin-top: 12px;
}

.fx-text {
    display: contents;
}

.fx-text > .fx-eyebrow,
.fx-text > h2 {
    order: 0;
}

.fx-shot {
    order: 1;
}

.fx-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
    order: 2;
}

/* Screens: one centred phone, or a swipeable row with the next one peeking in. */
.fx-railwrap {
    margin: 26px -16px 6px;
}

.fx-rail {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 16px 12px;
    scroll-padding-left: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.fx-rail::-webkit-scrollbar {
    display: none;
}

.fx-slide {
    flex: none;
    margin: 0;
    scroll-snap-align: start;
    width: 236px;
}

.fx-slide.courts {
    width: 300px;
}

.fx-slide figcaption {
    color: var(--color-soft-ink);
    font-size: 12px;
    line-height: 1.3;
    margin-top: 9px;
    text-align: center;
}

.fx-phone {
    background: var(--color-ink);
    border-radius: 34px;
    box-shadow: 0 1px 2px var(--fx-lift), 0 14px 26px -16px var(--fx-lift);
    padding: 7px;
    width: 236px;
}

.fx-phone img {
    aspect-ratio: 390 / 844;
    background: var(--color-surface);
    border-radius: 27px;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.fx-phonewrap {
    display: flex;
    justify-content: center;
    margin: 26px 0 6px;
}

.fx-phonewrap .fx-slide,
.fx-phonewrap .fx-phone {
    width: 300px;
}

.fx-phonewrap .fx-phone {
    border-radius: 42px;
    padding: 8px;
}

.fx-phonewrap .fx-phone img {
    border-radius: 34px;
}

.fx-courts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fx-court {
    background: var(--color-surface);
    border-radius: 14px;
    box-shadow: 0 1px 2px var(--fx-lift), 0 12px 22px -16px var(--fx-lift);
    overflow: hidden;
}

.fx-court img {
    display: block;
    height: auto;
    width: 100%;
}

.fx-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 2px;
}

.fx-dots i {
    background: var(--color-strong);
    border-radius: 50%;
    height: 6px;
    width: 6px;
}

.fx-dots i.on {
    background: var(--color-ink);
}

/* The one call-to-action band, and the close. */
.fx-cta {
    background: var(--color-ink);
    color: var(--color-on-accent);
    margin: 0 -16px;
    padding: 44px 16px 46px;
}

.fx .fx-cta h2 {
    color: var(--color-on-accent);
    font-size: 36px;
    line-height: 1;
    margin: 0;
}

.fx-cta p {
    color: var(--color-subtle);
    font-size: 15px;
    line-height: 1.45;
    margin: 10px 0 22px;
}

.fx-btn {
    align-items: center;
    background: var(--color-accent);
    border-radius: 10px;
    color: var(--color-on-accent);
    display: inline-flex;
    font-size: 16px;
    font-weight: 600;
    justify-content: center;
    line-height: 1;
    min-height: 48px;
    padding: 0 22px;
    text-decoration: none;
}

.fx-btn:hover {
    background: var(--color-accent-deep);
}

.fx-close {
    background: var(--color-ink);
    color: var(--color-on-accent);
    margin: 0 -16px;
    padding: 44px 16px 46px;
}

.fx-close .fx-eyebrow {
    color: var(--color-subtle);
}

.fx .fx-close h2 {
    color: var(--color-on-accent);
}

.fx-close .fx-p {
    color: var(--color-subtle);
}

.fx-close .fx-btn {
    margin-top: 26px;
}

.fx-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
}

.fx-facts li {
    align-items: center;
    display: flex;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    line-height: 1.3;
}

.fx-facts li::before {
    background: var(--color-subtle);
    border-radius: 50%;
    content: '';
    height: 5px;
    width: 5px;
}

.fx-quiet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 24px 0 0;
}

.fx-quiet a {
    color: var(--color-on-accent);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* More things to find: cards with a crop of the real screen. */
.fx-more {
    border-top: 1px solid var(--color-subtle);
    padding: 44px 0 36px;
    scroll-margin-top: 12px;
}

.fx-sub {
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.45;
    margin: 10px 0 0;
    max-width: 30em;
}

.fx-cards {
    display: grid;
    gap: 34px 36px;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
}

.fx .fx-card h3 {
    color: var(--color-ink);
    font-size: 24px;
    line-height: 1.05;
    margin: 14px 0 0;
}

.fx-card p {
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.5;
    margin: 8px 0 0;
    text-wrap: pretty;
}

.fx-crop {
    background: var(--color-surface);
    border-radius: 10px;
    box-shadow: 0 0 0 1px var(--color-subtle), 0 1px 2px var(--fx-lift);
    height: 170px;
    overflow: hidden;
}

.fx-crop img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.fx-rail-nav {
    display: none;
}

/* Reveal on scroll, only when the script is there to undo it. */
.fx-js .rv {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.fx-js .rv.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .fx-js .rv {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (min-width: 1024px) {
    .fx {
        display: grid;
        gap: 56px;
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .fx-index,
    .fx-head .fx-taken {
        display: none;
    }

    .fx-rail-nav {
        align-self: start;
        display: block;
        padding-top: 44px;
        position: sticky;
        top: 24px;
    }

    .fx-rail-nav ol {
        border-left: 1px solid var(--color-subtle);
        list-style: none;
        margin: 14px 0 0;
        padding: 0;
    }

    .fx-rail-nav a {
        border-left: 2px solid transparent;
        color: var(--color-muted);
        display: block;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
        margin-left: -1px;
        padding: 7px 0 7px 14px;
        text-decoration: none;
    }

    .fx-rail-nav a .fx-k {
        color: var(--color-soft-ink);
        font-size: 11px;
        letter-spacing: 0.06em;
        margin-right: 8px;
    }

    .fx-rail-nav li.on a {
        border-left-color: var(--color-accent);
        color: var(--color-ink);
        font-weight: 600;
    }

    .fx-main {
        min-width: 0;
    }

    .fx-head {
        padding: 44px 0 36px;
    }

    .fx h1 {
        font-size: 64px;
    }

    .fx-lede {
        font-size: 20px;
    }

    .fx h2 {
        font-size: 46px;
    }

    .fx-p {
        font-size: 17px;
    }

    .fx-sec {
        align-items: center;
        display: grid;
        gap: 56px;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 56px 0;
    }

    .fx-text {
        display: block;
    }

    .fx-shot {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .fx-text {
        grid-column: 2;
        grid-row: 1;
    }

    .fx-sec.flip .fx-shot {
        grid-column: 2;
    }

    .fx-sec.flip .fx-text {
        grid-column: 1;
    }

    .fx-railwrap {
        margin: 0;
    }

    .fx-rail {
        padding-inline: 0;
    }

    .fx-slide,
    .fx-phone {
        width: 250px;
    }

    .fx-slide.courts {
        width: 330px;
    }

    .fx-phonewrap {
        margin: 0;
    }

    .fx .fx-more h2 {
        font-size: 52px;
    }

    .fx-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fx-crop {
        height: 190px;
    }

    .fx-cta,
    .fx-close {
        margin: 0;
        padding: 56px 48px;
    }

    .fx .fx-cta h2,
    .fx .fx-close h2 {
        font-size: 48px;
    }
}
