/* Works route owns the gallery/filter and the page-level surfaces/intervals.
   Shared shell and rating internals remain owned by home.css. */

body[data-route="works"] .works-showcase {
  padding: 148px 0 60px;
  background: #fafafa;
}

body[data-route="works"] .works-breadcrumbs {
  display: flex;
  width: min(538px, 100%);
  max-width: 100%;
  gap: 4px;
  color: #303030;
  font-size: 14px;
  line-height: 17px;
}

body[data-route="works"] .works-breadcrumbs span[aria-current="page"] {
  color: #010f77;
}

body[data-route="works"] .works-showcase h1 {
  width: min(859px, 100%);
  margin: 60px 0 0;
  color: #232742;
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}

body[data-route="works"] .works-showcase h1 span {
  color: #c0c1cc;
}

body[data-route="works"] .works-layout {
  display: grid;
  grid-template-columns: minmax(240px, 315px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 60px;
}

body[data-route="works"] .works-categories {
  width: 100%;
  padding: 5px;
  background: #fff;
}

body[data-route="works"] .works-category-current {
  display: none;
}

body[data-route="works"] .works-category-list {
  display: grid;
  gap: 5px;
}

body[data-route="works"] .works-category {
  min-height: 41px;
  padding: 12px 15px 13px;
  color: #5f5f5f;
  background: #f5f5f5;
  border: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  text-align: left;
}

body[data-route="works"] .works-category.is-current {
  color: #fff;
  background: #010f77;
}

body[data-route="works"] .works-category:focus-visible,
body[data-route="works"] .works-category-current:focus-visible,
body[data-route="works"] .works-comparison:focus-within .works-comparison__drag {
  outline: 2px solid #4961ff;
  outline-offset: 3px;
}

body[data-route="works"] .works-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  padding-top: 5px;
}

body[data-route="works"] .works-case[hidden],
body[data-route="works"] .works-empty-message[hidden] {
  display: none;
}

body[data-route="works"] .works-case {
  min-width: 0;
}

body[data-route="works"] .works-comparison {
  --before-after-position: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 316 / 380;
  overflow: hidden;
  background: linear-gradient(148.846deg, #232323 19.268%, #414141 53.502%, #969696 98.811%);
  cursor: default;
  touch-action: pan-y;
}

body[data-route="works"] .works-comparison::after {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: var(--before-after-position);
  width: 2px;
  background: #fff;
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

body[data-route="works"] .works-comparison img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

body[data-route="works"] .works-comparison__label {
  position: absolute;
  z-index: 3;
  top: 20px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
  pointer-events: none;
}

body[data-route="works"] .works-comparison__label--before { left: 20px; }
body[data-route="works"] .works-comparison__label--after { right: 20px; }

body[data-route="works"] .works-comparison__drag {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: var(--before-after-position);
  display: grid;
  width: 60px;
  aspect-ratio: 1;
  place-items: center;
  color: #010f77;
  background: #fff;
  font-family: var(--font-display);
  font-size: 24px;
  font-style: normal;
  line-height: 1;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
}

body[data-route="works"] .works-case h2 {
  width: max-content;
  max-width: 100%;
  margin: 20px 0 0;
  color: #303030;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
}

body[data-route="works"] .works-case > p {
  width: max-content;
  max-width: 100%;
  margin: 20px 0 0;
  color: #303030;
  font-size: 14px;
  line-height: 1;
}

body[data-route="works"] .works-case__cta {
  --corner-color: #010f77;
  --corner-inset: -1px;
  position: relative;
  display: grid;
  width: 100%;
  min-height: 50px;
  place-items: center;
  margin-top: 30px;
  padding: 0;
  color: #303030;
  background: transparent;
  border: 1px solid #c4c4c1;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

body[data-route="works"] .works-case__cta::before,
body[data-route="works"] .works-case__cta::after {
  position: absolute;
  width: 10px;
  height: 10px;
  background: transparent;
  content: "";
  transform-origin: center;
  pointer-events: none;
}

body[data-route="works"] .works-case__cta::before {
  top: calc(100% - var(--corner-inset) - 10px);
  left: var(--corner-inset);
  border-bottom: 2px solid var(--corner-color);
  border-left: 2px solid var(--corner-color);
}

body[data-route="works"] .works-case__cta::after {
  top: var(--corner-inset);
  left: calc(100% - var(--corner-inset) - 10px);
  border-top: 2px solid var(--corner-color);
  border-right: 2px solid var(--corner-color);
}

body[data-route="works"] .works-case__cta:hover,
body[data-route="works"] .works-case__cta:focus-visible {
  --corner-color: #fff;
  color: #fff;
  background: #010f77;
  border-color: #010f77;
}

body[data-route="works"] .works-case__cta:hover::before,
body[data-route="works"] .works-case__cta:focus-visible::before {
  animation: home-corner-before-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
}

body[data-route="works"] .works-case__cta:hover::after,
body[data-route="works"] .works-case__cta:focus-visible::after {
  animation: home-corner-after-clockwise .58s cubic-bezier(.45, 0, .2, 1) both;
}

body[data-route="works"] .works-empty-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 30px;
  color: #5f5f5f;
  background: #fff;
  font-size: 16px;
}

body[data-route="works"] .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body[data-route="works"] .works-rating-zone {
  padding-top: 60px;
  background: #fff;
}

body[data-route="works"] .works-rating {
  margin-top: 0;
  background: #fff;
  box-shadow: none;
}

body[data-route="works"] .works-prefooter-space {
  display: none;
}

@media (min-width: 1360px) {
  body[data-route="works"] .works-rating > .page-shell {
    padding-bottom: 80px;
  }
}

@media (min-width: 1440px) {
  body[data-route="works"] .works-cases-grid {
    grid-template-columns: repeat(3, 316px);
  }
}

@media (min-width: 1000px) and (max-width: 1359px) {
  body[data-route="works"] .works-showcase {
    padding-top: 128px;
  }

  body[data-route="works"] .works-showcase h1 {
    font-size: clamp(42px, 4.2vw, 50px);
  }

  body[data-route="works"] .works-layout {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }

  body[data-route="works"] .works-cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 999px) {
  body[data-route="works"] .works-showcase {
    padding-top: 118px;
  }

  body[data-route="works"] .works-showcase h1 {
    margin-top: 45px;
    font-size: clamp(40px, 5vw, 48px);
  }

  body[data-route="works"] .works-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 45px;
  }

  body[data-route="works"] .works-categories {
    padding: 0;
    background: transparent;
  }

  body[data-route="works"] .works-category-current {
    position: relative;
    display: flex;
    min-height: 49px;
    align-items: center;
    padding: 0 50px 0 15px;
    color: #fff;
    background: #010f77;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.02em;
    list-style: none;
    cursor: pointer;
  }

  body[data-route="works"] .works-category-current::after {
    position: absolute;
    top: 15px;
    right: 21px;
    width: 13px;
    height: 13px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    content: "";
    transform: rotate(45deg);
    transform-origin: center;
  }

  body[data-route="works"] .works-categories.is-open .works-category-current::after {
    top: 22px;
    transform: rotate(225deg);
  }

  body[data-route="works"] .works-categories:not(.is-open) > .works-category-list {
    display: none;
  }

  body[data-route="works"] .works-category-list {
    padding: 5px;
    background: #fff;
  }

  body[data-route="works"] .works-cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 0;
  }

  body[data-route="works"] .works-comparison {
    aspect-ratio: 390 / 458;
  }
}

@media (max-width: 767px) {
  body[data-route="works"] .works-showcase {
    padding: 122px 0 0;
  }

  body[data-route="works"] .works-breadcrumbs {
    width: max-content;
    margin-left: 4px;
  }

  body[data-route="works"] .works-showcase h1 {
    max-width: 217px;
    margin-top: 20px;
    color: #232742;
    font-size: 32px;
    line-height: 1;
  }

  body[data-route="works"] .works-showcase h1 span {
    display: block;
  }

  body[data-route="works"] .works-layout {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 30px;
  }

  body[data-route="works"] .works-categories {
    padding: 0;
    background: transparent;
  }

  body[data-route="works"] .works-category-current {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    padding: 0 50px 0 15px;
    color: #fff;
    background: #010f77;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.02em;
    list-style: none;
    cursor: pointer;
  }

  body[data-route="works"] .works-category-current::after {
    position: absolute;
    top: 15px;
    right: 21px;
    width: 13px;
    height: 13px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    content: "";
    transform: rotate(45deg);
    transform-origin: center;
  }

  body[data-route="works"] .works-categories.is-open .works-category-current::after {
    top: 22px;
    transform: rotate(225deg);
  }

  body[data-route="works"] .works-categories:not(.is-open) > .works-category-list {
    display: none;
  }

  body[data-route="works"] .works-category-list {
    padding: 5px;
    background: #fff;
  }

  body[data-route="works"] .works-cases-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 0;
  }

  body[data-route="works"] .works-layout {
    row-gap: 30px;
  }

  body[data-route="works"] .works-comparison {
    aspect-ratio: 390 / 458;
  }

  body[data-route="works"] .works-case > p {
    margin-top: 10px;
  }

  body[data-route="works"] .works-case__cta {
    margin-top: 25px;
  }

  body[data-route="works"] .works-rating-zone {
    padding-top: 40px;
  }

  body[data-route="works"] .works-rating__number::after {
    font-size: 12px;
    content: attr(data-phone-number);
  }

  body[data-route="works"] .works-prefooter-space {
    display: block;
    height: 80px;
    background: linear-gradient(to bottom, #fafafa 0 40px, #fff 40px 80px);
  }
}

@media (max-width: 410px) {
  body[data-route="works"] .works-category-current,
  body[data-route="works"] .works-category {
    font-size: 15px;
  }
}
