/* PureSets roadmap (/roadmap). Builds on site.css. Flat surfaces and hairlines; the gradient
   title and the photo hero stay, glows and drop shadows do not. Motion is explanatory only:
   the example visuals play while on screen and hold a still frame under reduced motion. */

:root:not([lang="en"]) [lang="en"]:not(html),
:root[lang="en"] [lang="pl"] {
    display: none !important;
}

.rm-page .nav-inner { gap: 12px; }
.rm-page .logo-word { font-size: min(1.02rem, 4.6vw); }
.rm-page .nav-actions { flex-shrink: 0; }

/* Calmer reveal than the landing: short rise, no blur. */
.js .rm-page [data-reveal] {
    transform: translateY(10px);
    filter: none;
    transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out);
}

.js .rm-page [data-reveal].is-in { transform: none; }

/* ── Hero ── */
.rm-hero {
    position: relative;
    isolation: isolate;
    padding: calc(var(--nav-h) + clamp(56px, 9vw, 112px)) 0 clamp(40px, 6vw, 72px);
    text-align: center;
}

.rm-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.rm-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    filter: grayscale(0.35);
}

:root[data-theme="light"] .rm-hero-bg img { opacity: 0.12; }

.rm-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 50%, transparent), var(--bg) 96%);
}

.rm-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.rm-hero .display { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
.rm-hero .lead { max-width: 620px; }

/* ── Timeline ── */
.rm-main {
    max-width: calc(880px + var(--gutter) * 2);
    padding-bottom: clamp(72px, 10vw, 120px);
}

.rm-year {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 56px 0 24px;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.rm-year:first-child { margin-top: 0; }

.rm-year::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.rm-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-item {
    position: relative;
    padding: 0 0 16px 40px;
}

.rm-item::before {
    content: "";
    position: absolute;
    top: 34px;
    bottom: -26px;
    left: 7px;
    width: 1px;
    background: var(--line-strong);
}

.rm-item:last-child::before { display: none; }

.rm-dot {
    position: absolute;
    top: 26px;
    left: 2px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--text-3);
    border-radius: 50%;
    background: var(--bg);
}

.rm-item.is-now .rm-dot {
    border-color: var(--brand-bright);
    background: var(--brand-bright);
}

.rm-card {
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.rm-item.is-now .rm-card,
.rm-item.is-featured .rm-card { border-color: var(--line-strong); }

.rm-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 12px;
}

.rm-month {
    margin-right: auto;
    color: var(--text-2);
}

.rm-version {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rm-status.is-now {
    border-color: transparent;
    background: var(--brand);
    color: var(--on-brand);
}

.rm-card h3 { margin: 0 0 6px; }

.rm-sub {
    margin: 0 0 16px;
    color: var(--text-2);
    line-height: 1.6;
    text-wrap: pretty;
}

.rm-points {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-2);
}

.rm-points li {
    position: relative;
    padding-left: 18px;
    line-height: 1.5;
}

.rm-points li::before {
    content: "";
    position: absolute;
    top: 0.62em;
    left: 2px;
    width: 6px;
    height: 1px;
    background: var(--text-3);
}

/* A larger feature inside a release card. */
.rm-feature {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.rm-feature-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-bottom: 6px;
}

.rm-feature-head b {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.rm-tag {
    color: var(--accent-text);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Gym check mock ── */
.gc {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
    gap: 12px;
    margin-top: 16px;
}

@media (max-width: 44em) {
    .gc { grid-template-columns: minmax(0, 1fr); }
}

.gc-panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}

.gc-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-3);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gc-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.gc-photos img,
.gc-add {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
}

.gc-add {
    display: grid;
    place-items: center;
    border: 1px dashed var(--line-strong);
    color: var(--text-3);
    font-size: 1.1rem;
}

.gc-found {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gc-found li {
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 0.8rem;
}

.gc-rows {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gc-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

.gc-row:last-child { border-bottom: 0; }

.gc-row i { line-height: 1.35; }
.gc-row.is-ok i { color: var(--success); }
.gc-row.is-swap i { color: var(--warning); }

.gc-name { color: var(--text); }
.gc-row.is-swap .gc-name { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }

.gc-swap {
    grid-column: 2;
    color: var(--text-2);
    font-size: 0.84rem;
}

.gc-swap b { color: var(--text); font-weight: 600; }

.gc-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--text-2);
    font-size: 0.82rem;
}

.gc-foot i { margin-right: 4px; }

/* Rows settle in once, a few at a time. */
.js .rm-page .gc-row {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 360ms var(--ease-out), transform 420ms var(--ease-out);
    transition-delay: calc(240ms + var(--i, 0) * 60ms);
}

.js .rm-page .is-in .gc-row {
    opacity: 1;
    transform: none;
}

/* ── Exercise examples ── */
.ex-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

@media (max-width: 44em) {
    .ex-grid { grid-template-columns: minmax(0, 1fr); }
}

.ex {
    display: flex;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
    overflow: hidden;
}

.ex-visual {
    position: relative;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.ex-visual svg {
    display: block;
    width: 100%;
    height: auto;
}

.ex-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
}

.ex-title {
    display: grid;
    gap: 2px;
}

.ex-title b {
    font-family: var(--font-display);
    font-weight: 650;
    letter-spacing: -0.01em;
}

.ex-title span { color: var(--text-2); font-size: 0.86rem; }

.ex-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 0;
}

.ex-stats.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ex-stats div { min-width: 0; }

.ex-stats dt {
    color: var(--text-3);
    font-size: 0.74rem;
    letter-spacing: 0.02em;
}

.ex-stats dd {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ex-stats dd small {
    margin-left: 2px;
    color: var(--text-2);
    font-size: 0.78em;
    font-weight: 500;
}

/* Shared SVG strokes, bound to the theme. */
.mv-street { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linecap: round; }
.mv-major { stroke-width: 3.5; }
.mv-river { fill: none; stroke: rgba(var(--brand-glow), 0.22); stroke-width: 7; stroke-linecap: round; }
.mv-park { fill: color-mix(in srgb, var(--success) 9%, transparent); }
.mv-track { fill: none; stroke: color-mix(in srgb, var(--text-3) 55%, transparent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 6; }
.mv-route { fill: none; stroke: var(--brand-bright); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.mv-start { fill: var(--surface-2); stroke: var(--text-2); stroke-width: 2; }
.mv-rider { fill: var(--brand-bright); stroke: var(--surface-2); stroke-width: 3; }
.mv-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.mv-axis { fill: var(--text-3); font: 500 9px var(--font-body); }
.mv-contour { fill: none; stroke: var(--line); stroke-width: 1; }
.mv-line { fill: none; stroke: var(--brand-bright); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.mv-hr { fill: none; stroke: var(--pink, #f472b6); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.mv-stop-a { stop-color: rgb(var(--brand-glow)); stop-opacity: 0.28; }
.mv-stop-b { stop-color: rgb(var(--brand-glow)); stop-opacity: 0; }
.mv-hr-a { stop-color: var(--pink, #f472b6); stop-opacity: 0.22; }
.mv-hr-b { stop-color: var(--pink, #f472b6); stop-opacity: 0; }

/* Treadmill + watch panel (HTML, so it grows with the font). */
.tw {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.tw-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
}

.tw-hr {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
}

.tw-hr i {
    display: inline-block;
    color: var(--pink, #f472b6);
    font-size: 1.05rem;
}

.tw-hr strong {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.tw-hr span { color: var(--text-2); font-size: 0.84rem; }

.tw-watch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 0.78rem;
}

.tw-trace {
    position: relative;
    height: 56px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.tw-trace svg {
    position: absolute;
    inset: 0 auto 0 0;
    width: 200%;
    height: 100%;
}

.tw-zones {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
}

.tw-zones span {
    height: 5px;
    border-radius: 3px;
    background: var(--surface-3);
}

.tw-zones span.is-on { background: var(--pink, #f472b6); }

.tw-zone-label {
    color: var(--text-2);
    font-size: 0.8rem;
}

/* Strength sets (HTML). */
.st {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
}

.st-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    font-weight: 600;
}

.st-head span { color: var(--text-3); font-size: 0.8rem; font-weight: 500; }

.st-sets {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-variant-numeric: tabular-nums;
}

.st-sets li {
    display: grid;
    grid-template-columns: 1.6em minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 4px 10px;
    border-radius: 10px;
    background: var(--surface);
    font-size: 0.9rem;
}

.st-sets .st-n { color: var(--text-3); }
.st-sets i { color: var(--success); }

.st-sets li.is-current {
    outline: 1px solid color-mix(in srgb, var(--brand-bright) 55%, transparent);
    outline-offset: -1px;
}

.st-sets li.is-current i { color: var(--text-3); }

/* ── Motion for the example visuals (paused until on screen, see roadmap.js) ── */
.tw-trace svg { animation: tw-scroll 9s linear infinite; }
.tw-hr i { animation: tw-beat 1.1s var(--ease-out) infinite; transform-origin: 50% 60%; }

.ex:not(.is-playing) .tw-trace svg,
.ex:not(.is-playing) .tw-hr i { animation-play-state: paused; }

@keyframes tw-scroll {
    to { transform: translateX(-50%); }
}

@keyframes tw-beat {
    0%, 30%, 100% { transform: scale(1); }
    12% { transform: scale(1.14); }
}

/* ── Nutrition tiles ── */
.rm-features {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.rm-features li {
    grid-column: span 2;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-soft);
}

.rm-features li:nth-child(n + 4) { grid-column: span 3; }

@media (max-width: 45em) {
    .rm-features li,
    .rm-features li:nth-child(n + 4) { grid-column: 1 / -1; }
}

.rm-features b {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-weight: 600;
}

.rm-features b i {
    color: var(--text-3);
    font-size: 1rem;
}

.rm-features p {
    margin: 0;
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1.55;
}

.rm-note {
    margin: 32px 0 0;
    color: var(--text-3);
    font-size: 0.88rem;
    text-align: center;
}

.rm-footer { padding: 32px 0; }

.rm-footer .footer-bottom {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 560px) {
    .rm-item { padding-left: 26px; }
    .rm-item::before { left: 5px; }
    .rm-dot { left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .js .rm-page [data-reveal],
    .js .rm-page .gc-row {
        transform: none;
        transition: opacity 300ms ease;
        transition-delay: 0ms;
    }

    .tw-trace svg,
    .tw-hr i { animation: none; }
}
