/* Speed: our own architecture between the click and the first frame — viewer → nearest edge → origin, then the
   segments arriving and climbing the quality ladder. Plays once when on screen (.is-on from js/features/speed-meter.js);
   without JS or with reduced motion it simply shows the finished picture. */
@layer sections {
    .meter { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 18px 10px 14px; border-radius: 999px; color: var(--text-2); font-size: 14.5px; }
    .meter[hidden] { display: none; }
    .meter b { margin-left: 4px; color: var(--cyan-300); font-family: var(--font-display); font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
    .meter small { display: block; color: var(--text-4); font-size: 12px; }
    .meter__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-400); box-shadow: 0 0 12px var(--green-400); }

    .route { display: grid; gap: 40px; padding: 44px; }

    /* the map: three nodes joined by wires a pulse travels along */
    .route__map { display: grid; grid-template-columns: auto 1fr auto 1.4fr auto; align-items: center; gap: 14px; }
    .route__node { display: grid; grid-template-columns: 46px auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
    .route__node .i { grid-row: 1 / 3; width: 46px; height: 46px; padding: 12px; border-radius: 14px; background: var(--surface-raised); border: 1px solid var(--line-2); color: var(--text-2); }
    .route__node b { color: var(--text); font-size: 15px; }
    .route__node small { color: var(--text-3); font-size: 12.5px; }
    .route__node--edge .i { background: var(--grad-cyan); border-color: var(--cyan-200); color: var(--cyan-ink); box-shadow: var(--glow-cyan); }
    .route__node--origin { opacity: .55; }
    .route__wire { position: relative; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line-3) 0 6px, transparent 6px 12px); overflow: hidden; }
    .route__wire i { position: absolute; top: -1px; left: 0; width: 60px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--cyan-300)); opacity: 0; }
    .route.is-on .route__wire i { animation: wire-run 1.6s var(--ease) .2s 2 both; }
    .route__wire--long { opacity: .45; }
    .route.is-on .route__wire--long i { animation-delay: .6s; animation-iteration-count: 1; }
    @keyframes wire-run { 0% { left: -60px; opacity: 1; } 100% { left: 100%; opacity: 1; } }

    /* the ladder: poster, then 6-second segments rising rung by rung */
    .route__ladder {
        position: relative; display: grid; grid-template-columns: 1.3fr repeat(10, 1fr); align-items: end; gap: 6px;
        height: 210px; padding: 20px 20px 34px; border-radius: var(--r-film); background: var(--surface-film); box-shadow: inset 0 0 0 1px var(--line);
        overflow: hidden;
    }
    .route__clip { position: absolute; inset: 0; opacity: .18; }
    .route__poster { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; height: 34%; border-radius: 10px; background: var(--white-a8); color: var(--text-2); font-size: 12px; font-weight: 700; }
    .route__poster .i { width: 18px; height: 18px; }
    .route__seg {
        position: relative; display: grid; align-items: start; justify-items: center; padding-top: 8px;
        height: calc(22% + var(--rung) * 18%); border-radius: 10px 10px 6px 6px;
        background: linear-gradient(180deg, rgb(61 220 255 / calc(.25 + var(--rung) * .16)), rgb(61 220 255 / .08));
        box-shadow: inset 0 1px 0 var(--white-a30);
        transform-origin: bottom;
    }
    .route__seg small { color: var(--cyan-ink); font-size: 11px; font-weight: 900; }
    .route__seg:nth-child(n) small { color: var(--white); }
    .route__seg[style*="--rung: 3"] small, .route__seg[style*="--rung: 4"] small { color: var(--cyan-ink); }
    html.js .route:not(.is-on) .route__seg, html.js .route:not(.is-on) .route__poster { opacity: 0; transform: scaleY(.2); }
    html.js .route .route__seg, html.js .route .route__poster { transition: opacity .4s, transform .6s var(--ease); transition-delay: calc(.9s + var(--i, -1) * .16s); }
    html.js .route .route__poster { transition-delay: .5s; }
    .route__axis { position: absolute; left: 20px; right: 20px; bottom: 8px; display: flex; justify-content: space-between; color: var(--text-4); font-size: 11.5px; font-style: normal; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    .route__axis i { font-style: normal; }

    .route__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
    .route__steps li { display: grid; gap: 8px; align-content: start; }
    .route__num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--cyan-a10); border: 1px solid var(--cyan-a25); color: var(--cyan-300); }
    .route__num .i { width: 19px; height: 19px; }
    .route__steps b { color: var(--text); font-size: 16px; }
    .route__steps p { color: var(--text-3); font-size: 14.5px; line-height: 1.5; }

    .facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
    .facts li { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px; background: var(--white-a4); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 600; }
    .facts .i { width: 16px; height: 16px; color: var(--cyan-300); }
    .speed .cta-row { justify-content: center; }

    @media (prefers-reduced-motion: reduce) {
        html.js .route:not(.is-on) .route__seg, html.js .route:not(.is-on) .route__poster { opacity: 1; transform: none; }
        .route.is-on .route__wire i { animation: none; }
    }
    @media (max-width: 960px) {
        .route { padding: 26px 20px; gap: 30px; }
        .route__steps { grid-template-columns: 1fr 1fr; }
        .route__map { grid-template-columns: auto 1fr auto; row-gap: 18px; }
        .route__wire--long, .route__node--origin { display: none; }
    }
    @media (max-width: 560px) {
        .route__steps { grid-template-columns: 1fr; }
        .route__ladder { grid-template-columns: repeat(10, 1fr); gap: 4px; height: 170px; padding: 14px 12px 30px; }
        .route__poster { display: none; }
        .route__seg small { display: none; }
        .route__node b { font-size: 13.5px; }
        .route__node small { display: none; }
        .route__node { grid-template-columns: 40px auto; }
        .route__node .i { width: 40px; height: 40px; padding: 10px; }
    }
}
