/* ── Детальная работы (/works/<uri>/). Видео-луп + галерея + детали. ──────── */
.wd { padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 48px); }
.wd__back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 20px; }
.wd__back:hover { color: var(--accent); }
.wd__title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; margin: 0; color: var(--fg); }
.wd__slogan { color: var(--accent); font-weight: 500; margin: 10px 0 0; font-size: 1.05rem; }
.wd-dirs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wd-dir {
  font-size: 0.8rem; font-weight: 600; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 12px; transition: all .15s;
}
.wd-dir:hover { color: var(--accent); border-color: var(--accent); }

.wd__layout {
  display: grid; grid-template-columns: 1fr 320px; gap: clamp(24px, 4vw, 56px);
  align-items: start; margin-top: 28px;
}
.wd__main { min-width: 0; }

/* видео-луп + youtube + hero */
.wd__video, .wd__hero {
  width: 100%; max-height: 560px; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px;
  background: color-mix(in srgb, var(--fg) 5%, var(--bg));
}
.wd__hero { cursor: zoom-in; }
.wd__yt { position: relative; aspect-ratio: 16 / 9; margin-bottom: 22px; }
.wd__yt iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  border-radius: var(--radius);
}

.wd__descr { color: var(--fg); line-height: 1.7; font-weight: 300; max-width: 70ch; }
.wd__descr h2 { font-size: 1.4rem; font-weight: 700; margin: 26px 0 12px; letter-spacing: -0.02em; }
.wd__descr h3 { font-size: 1.12rem; font-weight: 700; margin: 20px 0 10px; }
.wd__descr p { margin: 0 0 14px; color: var(--muted); }
.wd__descr strong, .wd__descr b { color: var(--fg); font-weight: 600; }
.wd__descr ul, .wd__descr ol { margin: 0 0 14px; padding-left: 22px; color: var(--muted); }
.wd__descr a { color: var(--accent); }
.wd__descr img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 12px 0; }

/* теги (SEO + навигация) */
.wd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wd-tag {
  font-size: 0.82rem; font-weight: 600; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 12px;
  transition: all .15s;
}
.wd-tag:hover { color: var(--spark); border-color: var(--spark); }

.wd-section { margin-top: 32px; }
.wd-section__title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--fg); }
.wd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.wd-gallery__item {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--fg) 5%, var(--bg)); transition: border-color .15s, transform .12s;
}
.wd-gallery__item:hover { border-color: var(--accent); transform: translateY(-2px); }

/* side */
.wd__side { position: sticky; top: 80px; }
.wd-specs { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 18px 20px; }
.wd-specs__title { font-size: 0.95rem; font-weight: 700; margin: 0 0 14px; color: var(--fg); }
.wd-specs__list { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.wd-specs__list dt { color: var(--muted); font-size: 0.86rem; }
.wd-specs__list dd { margin: 0; color: var(--fg); font-size: 0.9rem; font-weight: 600; text-align: right; }
.wd-specs__list dd a { color: var(--accent); text-decoration: none; }
.wd-specs__list dd a:hover { text-decoration: underline; }
.wd__source, .wd__order {
  display: block; text-align: center; padding: 11px; text-decoration: none;
  border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; margin-top: 8px; transition: all .15s;
}
.wd__source { border: 1px solid var(--line); color: var(--fg); }
.wd__source:hover { border-color: var(--accent); color: var(--accent); }
.wd__order { background: var(--accent); color: var(--accent-fg); }
.wd__order:hover { background: var(--accent-hover); }

/* zoom-оверлей (как material-detail) */
.wd-zoom {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: clamp(16px, 4vw, 48px); cursor: zoom-out;
  background: color-mix(in srgb, var(--bg) 12%, rgba(0,0,0,.82)); backdrop-filter: blur(6px);
}
.wd-zoom[hidden] { display: none; }
.wd-zoom__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
body.wd-zoom-open { overflow: hidden; }

@media (max-width: 820px) {
  .wd__layout { grid-template-columns: 1fr; }
  .wd__side { position: static; }
}
