/* The workshop is a gallery: a quiet canvas, clear controls, generous previews. */
body[data-page="workshop"] { padding-top: calc(var(--nav-h) + 24px); }
.workshop { min-height: 78vh; }
.ws-head { position: relative; isolation: isolate; grid-template-columns: minmax(0, 560px); gap: 20px 32px; min-height: 280px; padding: 38px 40px; margin-bottom: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: radial-gradient(ellipse at 85% 0%, color-mix(in oklab, var(--c2) 12%, transparent), transparent 64%), var(--card); }
.ws-head::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .15; background-image: linear-gradient(var(--line-strong) 1px, transparent 1px), linear-gradient(90deg, var(--line-strong) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.ws-copy, .ws-head .demo-note { position: relative; z-index: 3; }
.ws-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--accent-hi); font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.ws-eyebrow .i { width: 15px; height: 15px; }
.ws-head h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.12; letter-spacing: -.055em; }
.ws-head h1 > span { color: var(--accent-hi); }
.ws-head #wsLead { max-width: 420px; min-height: 48px; margin: 14px 0 24px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.ws-actions { gap: 10px; flex-wrap: wrap; }
.ws-actions .btn { height: 44px; }
.ws-actions .btn:not(.primary) { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.ws-actions .btn:not(.primary):hover { color: var(--ink); background: var(--bg-2); }
.ws-art { position: absolute; z-index: 0; inset: 0; overflow: hidden; border-radius: inherit; }
.ws-art::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--card) 0, var(--card) 26%, color-mix(in oklab, var(--card) 72%, transparent) 42%, color-mix(in oklab, var(--card) 18%, transparent) 66%, transparent), linear-gradient(0deg, #0000009e, transparent 34%); }
.ws-art-stage { position: absolute; inset: 0; }
.ws-slide { position: absolute; inset: 0; display: block; overflow: hidden; background: #0f1819; opacity: 0; transform: translateX(4%) scale(1.06); transition: opacity 1.1s var(--ease), transform 1.6s var(--ease); }
.ws-slide.grid { left: 28%; }
.ws-slide.on { opacity: 1; transform: none; }
.ws-slide.out { opacity: 0; transform: translateX(-3%) scale(.97); }
.ws-slide :is(img, canvas) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.ws-slide canvas { object-fit: cover; object-position: 50% 28%; }
.ws-slide.bg.on img { animation: ws-drift 14s ease-out both; }
@keyframes ws-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.ws-art-label { position: absolute; z-index: 3; right: 22px; bottom: 16px; display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100% - 44px)); padding: 7px 12px; border: 1px solid #ffffff1f; border-radius: 10px; background: #0b0d0eb0; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink-2); font: 10.5px var(--mono); letter-spacing: .08em; text-decoration: none; opacity: 0; transform: translateY(6px); transition: opacity .6s var(--ease) .5s, transform .6s var(--ease) .5s, border-color .2s, color .2s; }
.ws-art-label.in { opacity: 1; transform: none; }
.ws-art-label:hover { border-color: var(--accent-line); color: var(--ink); }
.ws-art-label i { flex: none; color: var(--accent-hi); font-style: normal; text-transform: uppercase; }
.ws-art-label em { min-width: 0; overflow: hidden; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .ws-slide, .ws-art-label { transition: opacity .3s; transform: none; } .ws-slide.bg.on img { animation: none; } }
.ws-head .demo-note { margin: 8px 0 0; }
/* наведение на шапку: плитка чуть вырастает и наклоняется за курсором (--hov/--px/--py/--mx/--my ведёт site.js),
   арт уходит вглубь (параллакс + зум), сетка-миллиметровка проступает вокруг курсора, по краю — свет, при входе пробегает блик */
.ws-head { transition: border-color .4s var(--ease), box-shadow .5s var(--ease); }
.ws-head:hover { border-color: color-mix(in oklab, var(--accent-line) 55%, var(--line-strong)); box-shadow: 0 40px 80px -46px #000, 0 30px 70px -40px color-mix(in oklab, var(--c1) 55%, transparent); }
.ws-art-stage, .ws-copy { transition: transform .9s var(--ease); }
.ws-art::before { content: ""; position: absolute; z-index: 3; inset: 0; pointer-events: none; opacity: var(--hov, 0); mix-blend-mode: soft-light;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), #ffffffb0, transparent 65%); }
.ws-art-stage::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, #ffffff22 48%, color-mix(in oklab, var(--accent-hi) 22%, transparent) 52%, transparent 62%) -120% 0 / 60% 100% no-repeat; }
.ws-head:hover .ws-art-stage::after { opacity: 1; background-position: 260% 0; transition: background-position 1.4s var(--ease), opacity .2s; }
@media (hover: hover) and (pointer: fine) {
  .ws-head::before { transition: opacity .5s var(--ease);
    mask-image: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 75%), linear-gradient(90deg, transparent 30%, #000); }
  .ws-head:hover::before { opacity: .32; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .ws-head.tilting { transform: perspective(1600px) translateY(calc(var(--hov, 0) * -4px)) scale(calc(1 + var(--hov, 0) * .014 - var(--prs, 0) * .006)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) !important; }
  .ws-head.tilting .ws-art-stage { transform: translate3d(calc(var(--px, 0) * -60px), calc(var(--py, 0) * -40px), 0) scale(calc(1 + var(--hov, 0) * .06)); transition: none; }
  .ws-head.tilting .ws-copy { transform: translate3d(calc(var(--px, 0) * 20px), calc(var(--py, 0) * 12px), 0); transition: none; }
}
.ws-bar { top: 62px; gap: 18px; margin: 0; padding: 14px 0; border-bottom-color: var(--line); background: transparent; animation: none; }
.ws-bar.stuck { background: color-mix(in oklab, var(--bg) 92%, transparent); box-shadow: 0 0 0 100vmax color-mix(in oklab, var(--bg) 92%, transparent); clip-path: inset(0 -100vmax); }
.ws-tabs { gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.ws-tabs .seg-ind { display: none; }
.ws-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-size: 16px; font-weight: 600; }
.ws-tabs button.on { border-color: var(--line-strong); background: var(--card); color: var(--ink); }
.ws-tabs button.on .i { color: var(--accent-hi); }
.ws-tabs button:not(.on):hover { background: var(--card); }
.ws-bar .search { flex-basis: 320px; }
.ws-bar .search .input { height: 44px; padding-right: 35px; background: var(--bg-2); border-radius: 11px; font-size: 13px; }
.ws-bar .search kbd { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--faint); font: 11px var(--mono); pointer-events: none; }
.ws-filters { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 22px 0; animation: none; }
.ws-filter-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.ws-filter-label { flex: none; min-width: 58px; color: var(--faint); font: 11px var(--mono); }
.ws-filters .seg.ghost { padding: 0; gap: 4px; }
.ws-filters .seg-ind { display: none; }
.ws-filters .seg button { height: 34px; padding: 0 12px; font-size: 13px; }
.ws-filters .seg button.on { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ws-filters .tchips { gap: 7px; }
.ws-filters .tchip { height: 30px; padding: 0 12px; background: transparent; border-color: var(--line); font-size: 12px; }
.ws-filters .tchip.on { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-soft); box-shadow: none; }
.ws-aspect { padding-left: 76px; }
.ws-meta { gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.ws-result-count { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ws-meta .count { color: var(--muted); font: 12px var(--font); }
.ws-meta .count strong { color: var(--ink); font-weight: 650; }
.ws-preview { display: flex; align-items: center; gap: 10px; }
.ws-preview .ws-filter-label { min-width: 0; }
.ws-preview .seg { background: transparent; border-color: transparent; padding: 3px; }
.ws-preview .seg button { font-size: 11px; padding: 0 9px; }
.ws-preview .seg-ind { top: 3px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.ws-reset { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent-hi); font-size: 11px; cursor: pointer; }
.ws-reset .i { width: 12px; height: 12px; }
.ws-reset:hover { background: var(--card-2); }
.workshop .more { padding: 32px 0 8px; }
.workshop .site-foot { margin-top: 46px; }
@media (max-width: 1050px) {
  .ws-head { padding: 30px; }
  .ws-bar { flex-wrap: nowrap; }
  .ws-tabs button { font-size: 14px; padding: 0 13px; }
  .ws-bar .search { flex: 0 1 280px; }
}
@media (max-width: 760px) {
  .ws-head { grid-template-columns: minmax(0, 1fr); padding: 28px; min-height: 0; }
  .ws-art { opacity: .4; }
  .ws-art-label { display: none; }
  .ws-head #wsLead { max-width: 100%; min-height: 0; }
  .ws-head h1 { font-size: 44px; }
  .ws-filter-row { align-items: flex-start; gap: 10px; }
  .ws-filter-label { padding-top: 8px; }
  .ws-preview .ws-filter-label { padding: 0; }
  .ws-aspect { padding-left: 68px; }
  .ws-meta { align-items: flex-start; }
}
@media (max-width: 640px) {
  body[data-page="workshop"] { padding-top: calc(var(--nav-h) + 12px); }
  .ws-head { padding: 24px 22px; border-radius: 18px; margin-bottom: 12px; }
  .ws-eyebrow { font-size: 10px; margin-bottom: 12px; }
  .ws-head h1 { font-size: clamp(32px, 8.3vw, 44px); }
  .ws-head #wsLead { font-size: 14px; margin: 12px 0 20px; }
  .ws-actions { gap: 4px; }
  .ws-actions .btn { font-size: 12px; padding: 0 12px; }
  .ws-bar { position: static; flex-wrap: wrap; gap: 12px; padding: 12px 0 18px; }
  .ws-tabs { width: 100%; gap: 8px; }
  .ws-tabs button { flex: 1; height: 44px; font-size: 14px; }
  .ws-bar .search { flex: 1 1 100%; }
  .ws-bar .search kbd { display: none; }
  .ws-filters { padding: 16px 0; gap: 12px; }
  .ws-filter-row { flex-direction: column; gap: 6px; }
  .ws-filter-label { padding: 0; font-size: 10px; }
  .ws-filters .seg.ghost { flex-wrap: wrap; overflow: visible; gap: 2px; }
  .ws-filters .seg button { padding: 0 9px; font-size: 11px; }
  .ws-filters .tchips { gap: 6px; }
  .ws-filters .tchip { font-size: 11px; padding: 0 10px; }
  .ws-aspect { padding-left: 0; }
  .ws-meta { padding: 14px 0; gap: 10px; }
  .ws-preview { gap: 4px; flex-wrap: wrap; }
  .ws-preview .seg button { padding: 0 7px; font-size: 10px; }
}
