.works-hero {
  padding: clamp(2rem, 4vw, 3.25rem) 0 0.25rem;
}
.works-hero h1 { margin: 0 0 0.75rem; }
.works-hero__lead {
  max-width: 44rem;
  margin: 0 0 0.9rem;
}
.works-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}
.works-section.zh-block { padding-top: clamp(1.8rem, 4vw, 3.2rem); }
.page-nashi-raboty :target,
.page-nashi-raboty #lenta,
.page-nashi-raboty #zayavka {
  scroll-margin-top: calc(var(--preview-banner-h, 0px) + 5.5rem);
}
.works-feed-note { padding-top: 1.6rem; }
.works-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.works-case {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 16 / 10;
  min-height: 240px;
  border-radius: 18px;
  background: #1a1f2e;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.works-case::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 10, 16, 0.04) 38%, rgba(8, 10, 16, 0.46) 68%, rgba(8, 10, 16, 0.82) 100%);
  pointer-events: none;
}
.works-case__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.25s ease;
}
.works-case__badge {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  z-index: 2;
  max-width: calc(100% - 1.8rem);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font: 600 0.72rem/1.25 var(--font);
  letter-spacing: 0.01em;
}
.works-case__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.05rem 1.15rem 1.1rem;
}
.works-case h3 {
  margin: 0 0 0.4rem;
  color: #fff;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.works-case p {
  margin: 0 0 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.works-case__cta {
  display: inline-block;
  color: #fff;
  font: 600 0.86rem/1.2 var(--font);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}
.works-case:not(a) .works-case__cta {
  opacity: 0.78;
}
a.works-case:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.works-cases__more { margin: 1.25rem 0 0; }
.works-muted {
  margin: 1.1rem 0 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}
@media (hover: hover) and (pointer: fine) {
  .works-case:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(1, 100, 253, 0.12);
  }
  .works-case:hover .works-case__photo { transform: scale(1.05); }
  a.works-case:hover .works-case__cta { transform: translateX(4px); }
}
.works-questions,
.works-topics,
.works-catalog {
  margin: 0 0 1.1rem;
  padding-left: 1.15rem;
}
.works-questions li,
.works-topics li,
.works-catalog li {
  margin: 0 0 0.4rem;
}
.works-method {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: works-step;
}
.works-method li {
  position: relative;
  padding: 1.1rem 1.15rem 1.15rem 3.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elevated);
  counter-increment: works-step;
}
.works-method li::before {
  content: counter(works-step);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #fff;
  font: 700 0.82rem/1.7rem var(--font);
  text-align: center;
}
.works-method h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.works-method p { margin: 0; }
@media (max-width: 720px) {
  .works-cases,
  .works-method { grid-template-columns: 1fr; }
  .works-case { aspect-ratio: 4 / 3; }
  .works-case p { -webkit-line-clamp: 2; }
}

.works-ig { padding: 1.5rem 0 0; }
.home-stories { padding: 0; }
.home-stories .ig-stack {
  --sheet-radius: 0px;
  --sheet-tail: 0px;
  --marquee-corner: 0px;
  --marquee-fade: 28px;
}
.home-stories .ig-marquee,
.home-stories .ig-sheet {
  border-radius: 0;
}
.home-stories .ig-marquee::after { display: none; }
.home-stories .ig-sheet {
  margin-top: 0;
  padding: 1.35rem 0 2.25rem;
}
.home-stories .ig-marquee__band {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
}
.home-stories .ig-marquee__band::before,
.home-stories .ig-marquee__band::after {
  display: none;
}

@media (min-width: 1200px) {
  .home-stories .ig-stories {
    container-type: inline-size;
    --home-story-gap: 10px;
    --home-story-size: calc((100cqi - 14 * var(--home-story-gap)) / 15);
    gap: var(--home-story-gap);
    min-width: 0;
    overflow-x: visible;
  }
  .home-stories .ig-story {
    flex: 0 0 var(--home-story-size);
    width: var(--home-story-size);
    max-width: var(--home-story-size);
  }
  .home-stories .ig-story__ring {
    width: var(--home-story-size);
    height: var(--home-story-size);
    flex-shrink: 0;
  }
  .home-stories .ig-story__ring img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
  }
  .home-stories .ig-story__title {
    max-width: 100%;
  }
}
.works-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}
.works-tabs__btn {
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1.5px solid rgba(26, 31, 46, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #1a1f2e;
  font: 500 0.88rem var(--font);
  cursor: pointer;
}
.works-tabs__btn.is-on {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #fff;
}

.ig-stack {
  --sheet-radius: clamp(20px, 4vw, 28px);
  --sheet-tail: var(--sheet-radius);
  --marquee-corner: clamp(20px, 3vw, 28px);
  --marquee-fade: clamp(56px, 12vw, 96px);
  overflow-x: clip;
  max-width: 100%;
}
.ig-stack.is-hidden { display: none; }
.ig-marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--accent);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
}
.ig-marquee::after {
  content: "";
  display: block;
  height: var(--sheet-tail);
  background: var(--accent);
}
.ig-marquee__band {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  padding: 0.7rem 0;
  -webkit-mask-image:
    radial-gradient(circle at 0 100%, transparent calc(var(--marquee-corner) - 1px), #000 var(--marquee-corner)),
    radial-gradient(circle at 100% 100%, transparent calc(var(--marquee-corner) - 1px), #000 var(--marquee-corner)),
    linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
  mask-image:
    radial-gradient(circle at 0 100%, transparent calc(var(--marquee-corner) - 1px), #000 var(--marquee-corner)),
    radial-gradient(circle at 100% 100%, transparent calc(var(--marquee-corner) - 1px), #000 var(--marquee-corner)),
    linear-gradient(90deg, transparent 0, #000 var(--marquee-fade), #000 calc(100% - var(--marquee-fade)), transparent 100%);
  -webkit-mask-composite: source-in, source-in;
  mask-composite: intersect, intersect;
}
.ig-marquee__band::before,
.ig-marquee__band::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--marquee-fade);
  z-index: 2;
  pointer-events: none;
}
.ig-marquee__band::before {
  left: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 22%, transparent 100%);
}
.ig-marquee__band::after {
  right: 0;
  background: linear-gradient(270deg, var(--accent) 0%, var(--accent) 22%, transparent 100%);
}
.ig-marquee__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.ig-marquee__item {
  flex: 0 0 auto;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ig-marquee__item::after {
  content: "·";
  margin-inline: 1em;
}
@keyframes ig-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ig-sheet {
  position: relative;
  z-index: 3;
  margin-top: calc(-1 * var(--sheet-tail));
  background: #0d1119;
  color: #fff;
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: calc(1.35rem + var(--sheet-tail)) 0 4rem;
}

.ig-profile { margin-bottom: 1rem; }
.ig-profile__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ig-profile__avatar {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #11141c;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.ig-profile__avatar img {
  width: 72px;
  height: 72px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}
.ig-profile__name {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.ig-profile__bio {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.68);
}

.ig-stories {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.ig-stories::-webkit-scrollbar { display: none; }
.ig-story {
  flex: 0 0 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.ig-story__ring {
  display: block;
  width: 68px;
  height: 68px;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #7eb6ff, #0164fd, #3d86ff, #7eb6ff);
}
.ig-story__ring.is-viewed { background: #4a5160; }
.ig-story__ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0d1119;
}
.ig-story__title {
  font-size: 0.68rem;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.86);
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.ig-grid__item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: #171b26;
  cursor: pointer;
  overflow: hidden;
}
.ig-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ig-grid__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}
.ig-empty {
  margin: 0;
  padding: 1.5rem 0.5rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}
.ig-soon {
  position: relative;
  overflow: hidden;
  min-height: clamp(240px, 42vw, 420px);
}
.ig-soon__photo {
  display: block;
  width: 100%;
  height: clamp(240px, 42vw, 420px);
  object-fit: cover;
  filter: brightness(0.42) saturate(0.85);
}
.ig-soon__veil {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, 0.48);
}
.ig-soon__copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.ig-soon__logo {
  width: min(168px, 46vw);
  height: auto;
}
.ig-soon__note {
  margin: 0.9rem 0 0;
  max-width: 34ch;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.ig-modal[hidden] { display: none; }
.ig-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-modal__back {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}
.ig-modal__shell {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 2rem));
}
.ig-modal__close {
  position: absolute;
  top: -8px;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.ig-carousel-wrap { position: relative; }
.ig-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.ig-carousel::-webkit-scrollbar { display: none; }
.ig-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.ig-slide img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #000;
}
.ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}
.ig-nav--prev { left: 8px; }
.ig-nav--next { right: 8px; }
.ig-modal__meta { padding-top: 0.75rem; color: #fff; }
.ig-counter { margin: 0 0 0.3rem; }
.ig-story-stage {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #05070c;
}
.ig-caption { margin: 0 0 0.3rem; color: #fff; }
.ig-story-stage .ig-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 2.4rem 0.9rem 0.75rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.62) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.ig-unmute {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-unmute:hover { background: rgba(255, 255, 255, 0.28); }
.ig-unmute[hidden] { display: none; }
.ig-story-stage video,
.ig-story-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: transparent;
}
.ig-story-stage video[hidden],
.ig-story-stage img[hidden] {
  display: none !important;
}
.ig-story-stage video::-webkit-media-controls {
  display: none !important;
}
.ig-story-stage video::-webkit-media-controls-start-playback-button {
  display: none !important;
}
.ig-progress {
  height: 3px;
  margin: 0 0 0.8rem;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  overflow: hidden;
}
.ig-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}
body.ig-open { overflow: hidden; }
.ig-story-actions { display: none; }

@media (max-width: 1024px) {
  body.ig-open .header,
  body.ig-open .header-compact,
  body.ig-open .lead-bar,
  body.ig-open .mobile-nav {
    display: none !important;
  }
  .ig-modal--story {
    z-index: 150;
    align-items: stretch;
    justify-content: stretch;
  }
  .ig-modal--story .ig-modal__back { background: #05070c; }
  .ig-modal--story .ig-modal__shell {
    width: 100%;
    max-width: none;
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(78px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
  }
  .ig-modal--story .ig-modal__close {
    top: calc(6px + env(safe-area-inset-top, 0px));
    right: 8px;
  }
  .ig-modal--story .ig-story-stage {
    flex: 1;
    min-height: 0;
    width: 100%;
  }
  .ig-modal--story .ig-story-stage video,
  .ig-modal--story .ig-story-stage img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
  }
  .ig-modal--story .ig-caption {
    padding: 2.6rem 0.85rem 0.7rem;
    font-size: 0.92rem;
  }
  .ig-modal--story .ig-unmute {
    bottom: auto;
    top: 12px;
    right: 56px;
  }
  .ig-story-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 4;
  }
  .ig-story-actions__btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 14px;
    font: 600 0.95rem var(--font);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .ig-story-actions__btn--call {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  }
  .ig-story-actions__btn--zamer {
    background: var(--accent);
    color: #fff;
  }
}

@media (max-width: 720px) {
  .ig-grid { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .ig-marquee__track { animation: none !important; }
  .works-case,
  .works-case__photo,
  .works-case__cta { transition: none; }
  .works-case:hover,
  .works-case:hover .works-case__photo,
  a.works-case:hover .works-case__cta { transform: none; }
}
