/* Totemphonia v2 · Soundwalk. Kilian: the route, paper and ink only, the full v1 text, the e-mail form.
   The narrative scrolls on the left while the route stays beside it and is walked (assets/js/soundwalk.js). */

.sw { --cols: repeat(12, minmax(0, 1fr)); --hdr: 4.25rem; --s-h: clamp(1.9rem, 1.2rem + 2.3vw, 3.25rem); }
.sw section { padding: 0 var(--gutter); }
.s-link { display: inline-flex; gap: 0.45rem; font-weight: 500; padding: 0.35rem 0; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px; transition: background-size 0.6s var(--settle); }
.s-link::after { content: '↓'; transition: translate 0.5s var(--settle); }
.s-link:focus-visible { background-size: 0% 1px; background-position: 100% 100%; }
@media (hover: hover) { .s-link:hover { background-size: 0% 1px; background-position: 100% 100%; } }
.s-link:focus-visible::after { translate: 0 0.2rem; }
@media (hover: hover) { .s-link:hover::after { translate: 0 0.2rem; } }
.s-inline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: text-decoration-color 0.3s; }
.s-inline:focus-visible { text-decoration-color: transparent; }
@media (hover: hover) { .s-inline:hover { text-decoration-color: transparent; } }

/* ---------- the walk ---------- */
.s-walk { display: grid; grid-template-columns: var(--cols); gap: 0 var(--gutter); align-items: start; }
.s-walk__text { grid-column: 1 / span 6; padding-bottom: 18svh; }
.s-hero { min-height: calc(100svh - 10rem); display: grid; align-content: center; padding-top: var(--hdr); }
.s-title { font-family: var(--f-voice); font-weight: 300; font-size: clamp(3.4rem, 1.6rem + 6vw, 7.4rem); line-height: 0.95; letter-spacing: -0.03em; margin-left: -0.05em; }
.s-sub { margin-top: 1.1rem; font-family: var(--f-voice); font-weight: 300; font-size: clamp(1.6rem, 0.9rem + 2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.015em; max-width: 18ch; color: color-mix(in srgb, var(--ink) 82%, var(--ground)); }
.s-prose { display: grid; gap: 1.15rem; max-width: 40rem; }
.s-prose p { line-height: 1.62; }
.s-h2 { font-family: var(--f-voice); font-weight: 300; font-size: clamp(1.6rem, 1.15rem + 1.3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.015em; margin-top: clamp(3.5rem, 12svh, 7rem); margin-bottom: 0.3rem; }
.s-walk__route { grid-column: 8 / -1; position: sticky; top: var(--hdr); height: calc(100svh - var(--hdr)); display: grid; grid-template-rows: 1fr auto; padding: 1.5rem 0 1.8rem; }
.route { width: 100%; height: 100%; overflow: visible; }
.route__grid path { stroke: var(--ink); stroke-opacity: 0.06; stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.route__way { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1.2; stroke-dasharray: 1.5 6; stroke-linecap: round; }
.route__walked { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.route__walker { fill: var(--ink); }
.route__st circle { fill: var(--ground); stroke: var(--ink); stroke-width: 1.2; transition: fill 0.5s var(--settle); }
.route__st.is-reached circle { fill: var(--ink); }
.route__st text { transition: opacity 0.6s var(--settle); opacity: 0.3; }
.route__st.is-reached text { opacity: 1; }
.route__name { font: 500 15px var(--f-use); fill: var(--ink); }
.route__hear { font: 400 12.5px var(--f-data); fill: var(--muted); letter-spacing: 0.02em; }
.route__cap { font-size: var(--t-ui); color: var(--muted); max-width: 44ch; }

/* ---------- sections: heading left, text right ---------- */
.s-sec { display: grid; grid-template-columns: var(--cols); gap: 1.4rem var(--gutter); margin-top: clamp(6rem, 18svh, 11rem); scroll-margin-top: calc(var(--hdr) + 1.5rem); }
.s-sec__head { grid-column: 1 / span 5; }
.s-h { font-family: var(--f-voice); font-weight: 300; font-size: var(--s-h); line-height: 1.05; letter-spacing: -0.02em; margin-left: -0.04em; text-wrap: balance; }
.s-sec__body { grid-column: 7 / -1; max-width: 46rem; display: grid; gap: 1.1rem; align-content: start; }
.s-sec__body p { line-height: 1.6; }
.s-facts, .s-modules { display: grid; }
.s-facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.s-facts div:last-child { border-bottom: 1px solid var(--line); }
.s-facts dt { font-size: var(--t-ui); color: var(--muted); padding-top: 0.15em; }
.s-modules { grid-template-columns: 1fr 1fr; gap: 1.6rem var(--gutter); }
.s-modules dt { font-family: var(--f-voice); font-size: 1.3rem; line-height: 1.2; margin-bottom: 0.35rem; }
.s-modules dd { font-size: 0.94rem; line-height: 1.5; color: color-mix(in srgb, var(--ink) 82%, var(--ground)); }
.s-steps { counter-reset: step; display: grid; gap: 1rem; }
.s-steps li { counter-increment: step; position: relative; padding-left: 2.4rem; line-height: 1.6; } /* a hanging number, not a grid: bare text runs would become cells */
.s-steps li::before { content: counter(step); position: absolute; left: 0; top: 0.35em; font-family: var(--f-data); font-size: var(--t-data); color: var(--muted); }
.s-list { display: grid; }
.s-list li { padding: 0.65rem 0 0.65rem 1.4rem; border-top: 1px solid var(--line); position: relative; line-height: 1.5; }
.s-list li:last-child { border-bottom: 1px solid var(--line); }
.s-list li::before { content: ''; position: absolute; left: 0; top: 1.25em; width: 0.5rem; height: 1px; background: var(--ink); }

/* ---------- tablet / phone: the whole route, drawn, after the title ---------- */
@media (max-width: 1000px) {
  .s-walk__text { display: contents; } /* title, route, prose: in that order */
  .s-hero, .s-walk__route, .s-prose { grid-column: 1 / -1; }
  .s-hero { order: 1; min-height: 0; padding: calc(var(--hdr) + 2.5rem) 0 2rem; }
  .s-walk__route { order: 2; position: relative; top: auto; height: auto; padding: 0 0 2.5rem; }
  .s-prose { order: 3; }
  .route { height: auto; max-height: 70svh; }
  .s-sec__head, .s-sec__body { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .s-modules { grid-template-columns: 1fr; }
  .s-facts div { grid-template-columns: 1fr; gap: 0.15rem; }
}
