/* Rabin-Interiors & Woods: Design Journey. Themed through the --riw-* variables in core.css.
   The rail has one column per step (--n); the script draws the room and fades its layers in and out. */

.riw-journey { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; align-items: start; }

/* Rail of steps */
.riw-jr-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 6px; }
.riw-jr-rail button { position: relative; padding: 16px 4px 2px 0; border: 0; background: none; text-align: left; color: var(--riw-dim); cursor: pointer; transition: color .3s; }
.riw-jr-rail button::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: var(--riw-line-strong); }
.riw-jr-rail button i { position: absolute; left: 0; top: 0; width: 0; height: 4px; border-radius: 4px; background: var(--riw-accent); }
.riw-jr-rail button.is-done i { width: 100%; }
.riw-jr-rail button.is-on, .riw-jr-rail button.is-done { color: var(--riw-text); }
.riw-jr-rail button:hover { color: var(--riw-text); }
.riw-jr-rail small { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; }
.riw-jr-rail b { display: block; margin-top: .2rem; font-size: .88rem; font-weight: 600; line-height: 1.3; }

/* Room */
.riw-jr-view { position: relative; border-radius: var(--riw-radius); overflow: hidden; background: #e9e3d8; }
.riw-jr-svg { display: block; width: 100%; height: auto; }
.riw-jr-l { transition: opacity .7s, transform .7s cubic-bezier(.2,1,.3,1); }
.riw-jr-l.is-off { opacity: 0; transform: translateY(14px); }
.riw-jr-acc { fill: var(--riw-accent); }
.riw-jr-acc-s { stroke: var(--riw-accent); }
.riw-jr-t { font-family: var(--riw-font), system-ui, sans-serif; font-weight: 600; }
.riw-jr-display { font-family: var(--riw-font-display), system-ui, sans-serif; font-weight: 700; }
.riw-jr-play, .riw-jr-when { position: absolute; top: 14px; z-index: 2; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.2; }
.riw-jr-play { left: 14px; padding: .5rem .9rem; border: 0; background: #1c1712; color: #f6f1e9; cursor: pointer; }
.riw-jr-when { right: 14px; padding: .5rem .85rem; background: rgba(255,255,255,.85); color: #1c1712; letter-spacing: .12em; text-transform: uppercase; }

/* Steps */
.riw-jr-side { background: var(--riw-card); border: 1px solid var(--riw-line); border-radius: var(--riw-radius); padding: 1.7rem; }
.riw-jr-pane { display: flex; flex-direction: column; gap: 1.1rem; }
.riw-jr-pane[hidden] { display: none; }
.riw-jr-pane > * { animation: riw-jr-in .5s both; }
.riw-jr-pane > :nth-child(2) { animation-delay: .05s; }
.riw-jr-pane > :nth-child(3) { animation-delay: .1s; }
.riw-jr-pane > :nth-child(4) { animation-delay: .15s; }
@keyframes riw-jr-in { from { opacity: 0; transform: translateY(10px); } }
.riw-jr-pane h3 { font-size: clamp(1.9rem, 2.8vw, 2.6rem); }
.riw-jr-pane p { color: var(--riw-muted); font-size: .94rem; line-height: 1.6; }
.riw-jr-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.riw-jr-lists > div { border: 1px solid var(--riw-line-strong); border-radius: 16px; padding: .9rem 1rem; }
.riw-jr-lists h4 { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--riw-muted); font-weight: 600; line-height: 1.4; margin-bottom: .4rem; }
.riw .riw-jr-lists ul { list-style: none; margin: 0; padding: 0; font-size: .85rem; line-height: 1.6; }
.riw-jr-lists li::before { content: "— "; color: var(--riw-accent); }
.riw-jr-nav { display: flex; gap: 8px; margin-top: .3rem; }
.riw-jr-nav > * { flex: 1; justify-content: center; }
.riw-jr-prev, .riw-jr-next { padding: .9rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .3s, color .3s, border-color .3s, opacity .3s; }
.riw-jr-prev { border: 1px solid var(--riw-line-strong); background: none; color: var(--riw-text); }
.riw-jr-prev:disabled { opacity: .35; cursor: default; }
.riw-jr-next { border: 1px solid var(--riw-ink); background: var(--riw-ink); color: #f6f1e9; }
.riw--dark .riw-jr-next { background: var(--riw-accent-soft); border-color: var(--riw-accent-soft); color: #1c1712; }

@media (max-width: 1100px) {
	.riw-journey { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	.riw-jr-rail b, .riw-jr-rail small span { display: none; }
	.riw-jr-rail small { font-size: .6rem; letter-spacing: .08em; }
	.riw-jr-side { padding: 1.2rem; }
	.riw-jr-lists { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.riw-journey *, .riw-journey *::before { transition: none !important; animation: none !important; }
}
