/* Нестерова Алефтина — сайт «Стрелки» */
:root {
  --bg: #f9f8f4;
  --paper: #fdfcf9;
  --ink: #1a1a1a;
  --soft: #4a4a46;
  --muted: #8a8a84;
  --line: #dcdcd6;
  --f: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --move: .65s;
  --gutter: clamp(16px, 4vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-weight: 400; font-size: calc(17px * var(--k-text, 1)); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Строка сверху и компас ---------- */
.top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px var(--gutter) 26px; pointer-events: none; background: linear-gradient(var(--bg) 62%, transparent); }
.top > * { pointer-events: auto; }
.top__alt { display: none; }
[data-view="moy-podhod"] .top__n { display: none; }
[data-view="moy-podhod"] .top__alt { display: inline; }
.top__name { font-weight: 300; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); text-decoration: none; }
.compass { position: relative; width: 34px; height: 34px; opacity: 0; visibility: hidden; transition: opacity .3s; }
.js [data-view]:not([data-view="home"]) .compass { opacity: 1; visibility: visible; }
.compass__dot { position: absolute; width: 14px; height: 14px; display: grid; place-items: center; text-decoration: none; }
.compass__dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); transition: background .2s, transform .2s; }
.compass__dot:hover::before, .compass__dot.is-on::before { background: var(--ink); transform: scale(1.25); }
.compass__dot--up { left: 10px; top: 0; }
.compass__dot--down { left: 10px; bottom: 0; }
.compass__dot--left { left: 0; top: 10px; }
.compass__dot--right { right: 0; top: 10px; }
.compass__dot--mid { left: 10px; top: 10px; }
.compass__dot--mid::before { width: 11px; height: 11px; background: none; box-shadow: inset 0 0 0 1px var(--muted); }
.compass__dot span { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-weight: 300; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); opacity: 0; pointer-events: none; transition: opacity .2s; }
.compass__dot--right span { right: auto; left: calc(100% + 6px); }
.compass:hover .compass__dot--right span { opacity: 0; }
.compass__dot:hover span, .compass__dot:focus-visible span { opacity: 1 !important; }
.compass__dot--right:hover span { right: calc(100% + 30px); left: auto; }

/* ---------- Полотно: разделы по сторонам света ---------- */
.panel { position: relative; min-height: 100vh; min-height: 100svh; }
.js body { overflow: hidden; }
.js .world { position: fixed; inset: 0; transform: translate(calc(var(--wx, 0) * -100%), calc(var(--wy, 0) * -100%)); transition: transform var(--move) var(--ease); }
.js .panel { position: absolute; inset: 0; min-height: 0; transform: translate(calc(var(--px, 0) * 100%), calc(var(--py, 0) * 100%)); visibility: hidden; transition: visibility 0s var(--move); }
.js .panel { background: var(--bg); }
.js .panel.is-active, .js .panel.is-leaving { visibility: visible; transition: none; }
.panel__scroll { position: relative; height: 100%; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.panel__scroll--center { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }

/* ---------- Главная ---------- */
.panel--home { display: grid; place-items: center; overflow: hidden; }
.cross { --u: calc(min(100vw / 1300, 100svh / 860) * var(--k-home, 1)); position: relative; width: 0; height: 0; top: -3svh; }
.cross__figure { position: absolute; left: calc(var(--u) * -46); top: calc(var(--u) * -59); height: calc(var(--u) * 155); width: auto; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.go { position: absolute; display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.go .arr { flex: none; transition: transform .45s var(--ease); }
.go .arr { max-width: none; user-select: none; -webkit-user-drag: none; }
.go .arr--up { height: calc(var(--u) * 83); width: auto; }
.go .arr--down { height: calc(var(--u) * 72); width: auto; }
.go .arr--left { width: calc(var(--u) * 70); height: auto; }
.go .arr--right { width: calc(var(--u) * 68); height: auto; }
.go__label { font-weight: 300; font-size: max(12px, calc(var(--u) * 18)); line-height: 1; letter-spacing: .42em; text-transform: uppercase; white-space: nowrap; color: #2b2b29; transition: color .3s, letter-spacing .45s var(--ease); }
.go:hover .go__label, .go:focus-visible .go__label { color: #000; letter-spacing: .5em; }
.go--up { left: 0; bottom: calc(var(--u) * 101); transform: translateX(-50%); flex-direction: column-reverse; gap: calc(var(--u) * 46); }
.go--down { left: 0; top: calc(var(--u) * 117); transform: translateX(-50%); flex-direction: column; gap: calc(var(--u) * 46); }
.go--right { left: calc(var(--u) * 95); top: 0; transform: translateY(-50%); gap: calc(var(--u) * 70); }
.go--left { right: calc(var(--u) * 91); top: 0; transform: translateY(-50%); flex-direction: row-reverse; gap: calc(var(--u) * 64); }
.go--up .go__label, .go--down .go__label { margin-right: -.42em; }
.go--up:hover .arr { transform: translateY(-8px); }
.go--down:hover .arr { transform: translateY(8px); }
.go--right:hover .arr { transform: translateX(8px); }
.go--left:hover .arr { transform: translateX(-8px); }

/* ---------- Обратная стрелка ---------- */
.back { position: absolute; z-index: 5; display: flex; align-items: center; gap: 14px; color: var(--soft); text-decoration: none; }
.back .arr { flex: none; transition: transform .4s var(--ease); }
.back .arr--up, .back .arr--down { width: 12px; height: 44px; }
.back .arr--left, .back .arr--right { width: 44px; height: 12px; }
.back__label { font-weight: 300; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.back:hover .back__label, .back:focus-visible .back__label { opacity: 1; }
.back--down { left: 50%; bottom: 18px; transform: translateX(-50%); flex-direction: column; }
.back--up { left: 50%; top: 58px; transform: translateX(-50%); flex-direction: column; }
.back--right { right: 18px; top: 50%; transform: translateY(-50%); }
.back--left { left: 18px; top: 50%; transform: translateY(-50%); }
.back--down:hover .arr { transform: translateY(4px); }
.back--up:hover .arr { transform: translateY(-4px); }
.back--right:hover .arr { transform: translateX(4px); }
.back--left:hover .arr { transform: translateX(-4px); }
.back--right .back__label, .back--left .back__label { position: absolute; top: calc(100% + 10px); }
.back--right .back__label { right: 0; }
.back--left .back__label { left: 0; }

/* ---------- Текстовые страницы ---------- */
.page { width: min(100%, 980px); margin: 0 auto; padding: 132px var(--gutter) 132px; }
.page__title { margin: 0 0 40px; font-weight: 300; font-size: calc(clamp(32px, 2.2rem + 1.4vw, 54px) * var(--k-title, 1)); line-height: 1.12; letter-spacing: -.01em; }
.page__title--about { max-width: 18ch; }
.page__lead { max-width: 62ch; color: var(--soft); }
.btn-line { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; padding: 14px 0; border-bottom: 1px solid var(--ink); font-weight: 300; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; transition: gap .3s var(--ease); }
.btn-line::after { content: "→"; font-weight: 300; letter-spacing: 0; }
.btn-line:hover { gap: 22px; }

.svc { list-style: none; margin: 8px 0 0; padding: 0; max-width: 860px; text-align: left; counter-reset: svc; }
.svc__item { padding: 22px 0 18px; border-top: 1px solid var(--line); counter-increment: svc; }
.svc__name { margin: 0 0 8px; font-weight: 400; font-size: calc(19px * var(--k-text, 1)); line-height: 1.35; }
.svc__name::before { content: counter(svc, decimal-leading-zero); display: block; margin-bottom: 6px; font-weight: 300; font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.svc__text { color: var(--soft); font-size: calc(16px * var(--k-text, 1)); }
.svc__text p:last-child { margin-bottom: 0; }

.page--contacts { text-align: center; padding-top: 120px; }
.page--contacts .page__title { margin-bottom: 56px; }
.contacts { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(28px, 6vw, 72px); }
.contact { position: relative; display: grid; justify-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.contact svg { width: 46px; height: 46px; transition: transform .35s var(--ease); }
.contact:hover svg, .contact:focus-visible svg { transform: translateY(-4px); }
.contact__tip { font-weight: 300; font-size: 14px; letter-spacing: .06em; white-space: nowrap; color: var(--soft); opacity: 0; transition: opacity .3s; user-select: all; }
.contact:hover .contact__tip, .contact:focus-visible .contact__tip { opacity: 1; }

.page--about { width: min(100%, 1240px); }
/* по макету: фото в круге по центру, под ним заголовок в одну строку и текст широкой колонкой */
.about__portrait { display: block; grid-column: 1 / -1; width: clamp(180px, 16vw, 300px); height: auto; aspect-ratio: 1; margin: 0 auto clamp(48px, 8vh, 110px); border-radius: 50%; user-select: none; -webkit-user-drag: none; }
.page--about .page__title--about { max-width: none; font-size: calc(clamp(30px, 2.6vw, 48px) * var(--k-title, 1)); }
.page--about.has-photos { display: grid; grid-template-columns: minmax(0, 65ch) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 80px); align-items: start; }
.page--about .page__title { grid-column: 1 / -1; }
.about__text { max-width: 65ch; }
.page--about:not(.has-photos) .about__text { max-width: none; }
.page--about .about__text { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.page__title--fit { white-space: nowrap; }
.about__photos { display: grid; gap: 20px; position: sticky; top: 24px; }
.about__photos img { width: 100%; user-select: none; -webkit-user-drag: none; }

/* ---------- Мой подход ---------- */
.appr { position: relative; --side-w: calc(min(30vw, 440px) * var(--card-w, 1)); }
.appr__hero { --ar: 3543 / 3508; --sh: min(calc(var(--img-k, 1) * 100%), calc((100vw - 2 * var(--gutter) - 56px - var(--side-w) - var(--card-x, 2) * 1vw) * 3508 / 3543)); position: relative; display: grid; grid-template-columns: auto var(--side-w); grid-template-rows: minmax(0, 1fr); justify-content: center; column-gap: calc(max(0, var(--card-x, 2)) * 1vw); height: 100vh; height: 100svh; min-height: 600px; padding: 76px var(--gutter) 60px; overflow: hidden; }
.appr__stage { position: relative; grid-column: 1; grid-row: 1; align-self: center; justify-self: end; height: var(--sh); aspect-ratio: var(--ar); margin: 0; left: calc(var(--img-x, 0) * 1vw); touch-action: pan-y; }
.appr__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; mix-blend-mode: multiply; opacity: 0; user-select: none; -webkit-user-drag: none; }
.appr__img.is-on { opacity: 1; }
.appr__img.is-in { animation: flip .16s ease-out both; }
@keyframes flip { from { opacity: 0; } to { opacity: 1; } }

/* правая колонка той же высоты, что и картинка: заголовок по верху буквы, клавиши на оси нотного стана, превью внизу */
.appr__side { position: relative; z-index: 3; grid-column: 2; grid-row: 1; align-self: center; height: min(var(--sh), 100%); margin-left: calc(min(0, var(--card-x, 2)) * 1vw); display: flex; flex-direction: column; padding-top: var(--side-pad, 0px); transition: padding-top .25s var(--ease); }
.appr__title { margin: 0; font-weight: 300; font-size: calc(min(34px, var(--side-w) * .071) * var(--k-title, 1)); line-height: 1.15; }
.appr__card { position: relative; margin-top: clamp(18px, 2.4vh, 30px); transform: translateY(calc((var(--card-y, 50) - 50) * 1vh)); }
.appr__text { font-size: calc(clamp(14px, .82rem + .2vw, 16px) * var(--k-appr, 1) * var(--fit, 1)); line-height: 1.62; color: var(--soft); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.appr__text p { margin: 0 0 .8em; }
.appr__t { animation: rise .16s ease both; }
.appr__t[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.appr__keys { position: absolute; left: 0; right: 0; top: var(--keys-top, 79%); transform: translate(calc((var(--keys-x, 52) - 52) * 1vw), calc(-50% + var(--keys-y, 0) * 1px)); }
.appr__keys .sound { position: absolute; right: 0; bottom: 100%; margin-bottom: 2px; }
.appr__row { margin-top: auto; display: flex; gap: 5px; }
.appr__thumb { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 1; background: var(--paper); box-shadow: 0 0 0 1px var(--line); opacity: .7; transition: transform .25s var(--ease), opacity .2s, box-shadow .2s; }
.appr__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; mix-blend-mode: multiply; }
.appr__thumb:hover, .appr__thumb:focus-visible { opacity: 1; transform: translateY(-4px); }
.appr__thumb.is-on { opacity: 1; box-shadow: 0 0 0 1.5px var(--c, var(--ink)); transform: translateY(-4px); }
.appr__down { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); color: var(--soft); }
.appr__down .arr { width: 14px; height: 40px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

/* итоговая картинка: левый край — по картинке сверху, текст — по колонке текста (отступы считает main.js) */
.appr__final { position: relative; width: var(--fin-w, auto); margin: 72px var(--gutter) 0; margin-left: var(--fin-x, var(--gutter)); }
.appr__final img { width: 100%; mix-blend-mode: multiply; }
.appr__final-text { position: absolute; left: var(--fin-t, 64%); width: var(--side-w); bottom: 3%; font-weight: 300; font-size: clamp(12px, 1.05vw, 16px); line-height: 1.45; color: var(--ink); }
.appr__final-text p { margin: 0 0 .9em; }
.appr__foot { position: relative; display: flex; align-items: flex-end; min-height: 60px; margin: 56px var(--gutter) 0; padding-bottom: 72px; }
.appr__about { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); font-weight: 400; font-size: 16px; line-height: 1; letter-spacing: .28em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border-bottom: 1px solid transparent; transition: border-color .3s; }
.appr__about:hover { border-color: var(--ink); }
.appr__foot .piano { margin-left: var(--foot-x, auto); }

/* ---------- Видео ---------- */
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 28px; margin-top: 48px; text-align: left; }
.vid { margin: 0; }
.vid__frame { position: relative; display: grid; place-items: center; align-content: center; gap: 12px; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
iframe.vid__frame { display: block; border: 0; background: #000; }
.vid__frame svg { width: 54px; height: 54px; transition: transform .35s var(--ease); }
.vid__frame:hover svg, .vid__frame:focus-visible svg { transform: scale(1.08); }
.vid__hint { font-weight: 300; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.vid__cap { margin-top: 10px; font-size: 15px; color: var(--soft); }
.pf--empty .vids { width: min(100%, 900px); }

/* ---------- Пианино ---------- */
.piano { --kw: calc(30px * var(--keys-k, 1)); --kh: calc(21px * var(--keys-k, 1)); --g: #3d3c39; position: relative; display: flex; align-items: flex-end; gap: calc(var(--kw) * .08); width: calc(var(--kw) * var(--n, 8) * 1.08); height: calc(var(--kh) * 1.75); padding-top: calc(var(--kh) * .5); user-select: none; -webkit-tap-highlight-color: transparent; }
.pk { position: relative; z-index: 1; flex: 1 1 0; height: var(--kh); border: 1px solid var(--g); border-radius: 1px 1px 3px 3px; background: linear-gradient(to bottom, #fff 0, #fff 22%, #f1f0ec 100%); box-shadow: inset 0 1.5px 0 rgba(61, 60, 57, .55); transition: transform .12s var(--ease), background-color .2s, border-color .2s; }
.pk__l { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; font-weight: 300; font-size: 10px; line-height: 1; letter-spacing: 0; text-align: center; color: var(--muted); opacity: 0; transition: opacity .2s, color .2s; }
.piano:hover .pk__l, .pk:focus-visible .pk__l { opacity: 1; }
.pk:hover { transform: translateY(1px); }
.pk.is-on { transform: translateY(calc(var(--kh) * .22)); box-shadow: inset 0 1.5px 0 var(--c, var(--g)); }
.pk.is-on .pk__l { opacity: 1; color: var(--c, var(--ink)); }
.pk.is-down { transform: translateY(calc(var(--kh) * .3)); }
.pk-b { position: absolute; z-index: 0; top: 0; left: calc(var(--i) * var(--kw) * 1.08 - var(--kw) * .29); width: calc(var(--kw) * .5); height: calc(var(--kh) * 1.05); border: 1px solid var(--g); border-radius: 1px; background: #4a4946; transition: transform .12s var(--ease); }
.pk-b.is-down { transform: translateY(2px); }
.piano--foot { --kw: calc(26px * var(--keys-k, 1)); --kh: calc(15px * var(--keys-k, 1)); }
/* клавиши-картинки: 9 белых клавиш, видна одна из восьми картинок */
.piano--img { display: block; width: calc(var(--side-w) * var(--keys-k, 1)); max-width: 100%; height: auto; aspect-ratio: 900 / 88; padding: 0; gap: 0; }
.piano__img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; mix-blend-mode: multiply; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.piano__img.is-on { opacity: 1; }
.piano__hit { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(9, 1fr); }
.piano--img .pk, .piano--img .pk-b { position: static; height: auto; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
.piano--img .piano__black { position: absolute; z-index: 2; top: 0; left: 75.8%; width: 4.4%; height: 42%; }
.piano--img .pk:focus-visible { outline: 1px solid var(--ink); outline-offset: -2px; }
.piano--foot.piano--img { width: calc(var(--side-w) * var(--keys-k, 1)); }
.sound { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; font-weight: 300; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.sound svg { width: 18px; height: 18px; }
.sound .sound__wave { display: none; }
.sound.is-on { color: var(--ink); }
.sound.is-on .sound__wave { display: inline; }
.sound.is-on .sound__off { display: none; }
.sound:hover { color: var(--ink); }

/* ---------- Портфолио ---------- */
.pf { width: min(100%, 1440px); margin: 0 auto; padding: 104px calc(var(--gutter) + 56px) 96px; }
.pf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 40px; }
.pf__title { margin: 0; font-weight: 300; font-size: calc(clamp(34px, 2.2rem + 1.6vw, 60px) * var(--k-title, 1)); line-height: 1; letter-spacing: -.01em; }
.pf__tabs { position: relative; display: flex; gap: 4px 26px; flex-wrap: wrap; padding-bottom: 10px; }
.pf__tab { position: relative; padding: 6px 0; font-weight: 300; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); transition: color .25s; white-space: nowrap; }
.pf__tab sup { margin-left: 4px; font-size: 10px; letter-spacing: 0; }
.pf__tab:hover, .pf__tab.is-on { color: var(--ink); }
.pf__ink { position: absolute; left: 0; top: 0; width: var(--w, 0); height: 1px; background: var(--ink); transform: translate(var(--x, 0), var(--y, 0)); transition: transform .45s var(--ease), width .45s var(--ease); }
.pf__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 28px 24px; }
.pf__item[hidden] { display: none; }
.pf__item.is-big { grid-column: span 2; grid-row: span 2; }
.pf__item.is-in { animation: rise .55s var(--ease) both; animation-delay: var(--d, 0ms); }
.pf__card { display: grid; gap: 10px; width: 100%; height: 100%; align-content: start; text-align: left; }
.pf__img { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.pf__item.is-big .pf__img { aspect-ratio: auto; height: calc(100% - 64px); min-height: 280px; }
.pf__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .9s var(--ease); }
.pf__card:hover .pf__img img, .pf__card:focus-visible .pf__img img { transform: scale(1.05); }
.pf__meta { font-weight: 300; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pf__name { font-weight: 400; font-size: 16px; line-height: 1.35; transition: color .25s; }
.pf__item.is-big .pf__name { font-size: 20px; }
.pf__text { font-size: calc(14px * var(--k-text, 1)); color: var(--soft); }
.pf__drive { margin-top: 56px; }
.pf--empty { min-height: 100%; display: flex; flex-direction: column; justify-content: center; width: min(100%, 980px); padding-top: 132px; padding-bottom: 132px; }
.pf--empty .pf__head { margin-bottom: 32px; }
.pf--empty .pf__drive { margin-top: 36px; align-self: flex-start; }

/* ---------- Просмотр фото и образца ---------- */
.lb { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; background: var(--bg); }
.lb[hidden] { display: none; }
.lb.has-strip .lb__fig { padding-bottom: 132px; }
.lb.has-strip .lb__fig img { max-height: calc(100svh - 196px); }
.lb.has-strip .lb__cap { bottom: 104px; }
.lb__fig img.is-in { animation: lbin .35s ease both; cursor: pointer; }
@keyframes lbin { from { opacity: 0; transform: scale(.985); } }
.lb__strip { position: absolute; left: 72px; right: 72px; bottom: 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.lb__strip::-webkit-scrollbar { display: none; }
.lb__strip[hidden] { display: none; }
.lb__th { flex: none; width: 96px; height: 68px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); opacity: .55; transition: opacity .2s, box-shadow .2s; }
.lb__th img { width: 100%; height: 100%; object-fit: cover; }
.lb__th:hover { opacity: .9; }
.lb__th.is-on { opacity: 1; box-shadow: 0 0 0 1.5px var(--ink); }
.lb__fig { position: relative; margin: 0; height: 100vh; height: 100svh; display: grid; place-items: center; padding: 64px 0 72px; }
.lb__fig img { max-height: calc(100vh - 136px); max-height: calc(100svh - 136px); max-width: 100%; width: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb__mark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-weight: 300; font-size: clamp(18px, 3vw, 40px); letter-spacing: .3em; text-transform: uppercase; color: rgba(0, 0, 0, .09); transform: rotate(-24deg); }
.lb__cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-weight: 300; font-size: 14px; color: var(--soft); }
.lb__close { position: absolute; top: 14px; right: 18px; z-index: 2; width: 44px; height: 44px; font-weight: 200; font-size: 34px; line-height: 1; }
.lb__nav { height: 100%; display: grid; place-items: center; color: var(--soft); }
.lb__nav .arr { width: 40px; height: 12px; }
.lb__nav:hover { color: var(--ink); }
.lb__nav[hidden] { visibility: hidden; display: grid; }

/* ---------- Подписи стрелок на главной только при наведении (переключается в панели) ---------- */
@media (hover: hover) {
  .labels-hover .go__label { opacity: 0; transition: opacity .3s, color .3s, letter-spacing .45s var(--ease); }
  .labels-hover .go:hover .go__label, .labels-hover .go:focus-visible .go__label { opacity: 1; }
}

/* ---------- Без наведения (телефоны, планшеты) ---------- */
@media (hover: none) {
  .go__label, .back__label, .contact__tip { opacity: 1; transform: none; }
  .back--right .back__label, .back--left .back__label { display: none; }
}

/* ---------- Планшет и телефон ---------- */
@media (max-width: 959px) {
  body { font-size: calc(16px * var(--k-text, 1)); }
  .top { padding: 16px var(--gutter) 22px; }
  .top__name { font-size: 11px; letter-spacing: .1em; max-width: calc(100% - 60px); }
  .cross { --u: calc(min(100vw / 420, 100svh / 880) * var(--k-home, 1)); }
  .go__label { font-size: 12px; letter-spacing: .24em; }
  .go:hover .go__label { letter-spacing: .24em; }
  .go--up .go__label, .go--down .go__label, .go--left .go__label, .go--right .go__label { margin-right: -.24em; }
  .go--up, .go--down { gap: 18px; }
  /* подписи боковых стрелок — под стрелкой, от её внешнего конца внутрь: не налезают на края экрана */
  .go--right, .go--left { transform: translateY(-50%); }
  .go--right .go__label, .go--left .go__label { position: absolute; top: 100%; margin: 12px 0 0; }
  .go--right .go__label { right: -.24em; }
  .go--left .go__label { left: 0; }
  .page { padding: 124px var(--gutter) 112px; }
  .page__title { margin-bottom: 28px; font-size: calc(clamp(26px, 8.2vw, 40px) * var(--k-title, 1)); overflow-wrap: break-word; }
  .page--about.has-photos { display: block; }
  .about__portrait { width: min(56vw, 240px); margin-bottom: 36px; }
  .page--about .about__text { text-align: left; }
  .about__photos { position: static; grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
  /* кнопка «назад» сверху — полосой во всю ширину: прокручиваемый текст уходит под неё, а не сквозь подпись */
  .back--up { top: 0; left: 0; right: 0; transform: none; flex-direction: row; justify-content: center; gap: 10px; padding: 50px 0 18px; background: linear-gradient(var(--bg) 78%, transparent); }
  .back--up .arr--up { height: 36px; }
  .back--right, .back--left { top: auto; bottom: 18px; transform: none; }

  .appr { --side-w: calc(100vw - 2 * var(--gutter)); }
  .appr__hero { height: auto; min-height: 0; overflow: visible; padding: 70px 0 0; display: flex; flex-direction: column; }
  .appr__side { display: contents; padding: 0; margin: 0; }
  .appr__title { order: 0; padding: 0 var(--gutter); }
  .appr__keys { position: static; order: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: 18px var(--gutter) 0; transform: none; }
  .appr__keys .sound { position: static; margin: 0; }
  .piano--img, .piano--foot.piano--img { width: min(100%, calc(360px * var(--keys-k, 1))); }
  .appr__stage { order: 2; align-self: stretch; left: 0; height: auto; margin-top: 18px; }
  .appr__row { order: 3; margin: 14px var(--gutter) 0; }
  .appr__card { order: 4; margin: 18px var(--gutter) 0; transform: none; }
  .appr__text { font-size: calc(16px * var(--k-appr, 1)); }
  .appr__down { display: none; }
  .appr__final { width: auto; margin: 48px var(--gutter) 0; }
  .appr__final-text { position: static; width: auto; margin-top: 20px; font-size: 16px; }
  .appr__foot { flex-direction: column; align-items: flex-start; gap: 28px; margin-top: 32px; }
  .appr__about { position: static; transform: none; }
  .appr__foot .piano { margin-left: 0; }

  .lb { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .lb__nav .arr { width: 26px; }
  .lb__strip { left: 12px; right: 12px; }
  .lb__th { width: 72px; height: 51px; }

  .pf { padding: 96px var(--gutter) 96px; }
  .pf__head { margin-bottom: 28px; }
  .pf__tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; gap: 22px; }
  .pf__tabs::-webkit-scrollbar { display: none; }
  .pf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .pf__item.is-big { grid-row: auto; }
  .pf__item.is-big .pf__img { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
}
@media (min-width: 960px) and (max-width: 1200px) {
  .pf__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --move: .01s; }
  .pf__item.is-in, .lb__fig img.is-in,   .appr__t, .appr__img.is-in, .appr__down .arr { animation: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; }
.notfound__fig { width: auto; height: 160px; margin-bottom: 32px; }

/* Образец проекта: разделы-ссылки */
.sample__title { margin: 44px 0 0; font-weight: 400; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; }
.sample { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; }
.sample .btn-line { margin-top: 12px; padding: 8px 0; font-size: 15px; letter-spacing: .04em; text-transform: none; }

/* Телефоны (особенно iPhone) иногда смешивают картинку не с фоном страницы, а с прозрачным слоем:
   тогда виден её собственный светлый фон. Даём контейнерам картинок тот же цвет фона. */
.appr__stage, .appr__thumb, .appr__final, .piano--img, .pf__img { background-color: var(--bg, #f9f8f4); }
