/* /keysy/sayty/ — portfolio cases (clean layer over home-clean) */

body.ks-page {
  overflow-x: hidden;
}

.ks-hero {
  position: relative;
  padding: 24px 0 40px;
  background: #f7f8ff;
  overflow: hidden;
}

.ks-hero__inner {
  display: grid;
  gap: 28px;
  align-items: center;
}

.ks-hero__title {
  margin: 0 0 14px;
  font-family: var(--rk-font-head);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #7f3ff2 0%, #2084d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ks-hero__lead {
  margin: 0 0 18px;
  max-width: 40em;
  color: #4b4b4b;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.55;
}

.ks-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.ks-hero__tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(127, 63, 242, 0.1);
  color: #6b46c1;
  font-family: var(--rk-font-head);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.ks-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(270deg, rgb(223, 98, 226) 9%, rgb(106, 92, 234) 90%);
  color: #fff;
  font-family: var(--rk-font-head);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.ks-hero__media {
  margin: 0;
  text-align: center;
}

.ks-hero__media img {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
}

.ks-cases {
  padding: 48px 0;
  background: #fff;
}

.ks-cases__lead {
  margin: 0 0 28px;
  max-width: 48em;
  color: #555;
  font-size: 16px;
  line-height: 1.55;
}

.ks-cases__list {
  display: grid;
  gap: 32px;
}

.ks-case {
  display: grid;
  gap: 20px;
  padding: 20px;
  border: 1px solid #e6e9f5;
  border-radius: 16px;
  background: #f7f8ff;
}

.ks-case__media {
  position: relative;
  margin: 0;
}

.ks-case__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #e8eef8;
}

.ks-case__mockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--rk-link);
  font-family: var(--rk-font-head);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 30, 90, 0.08);
}

.ks-case__mockup:hover {
  background: #f0f4ff;
}

.ks-case__mockup:focus-visible {
  outline: 2px solid #2084d6;
  outline-offset: 2px;
}

.ks-case__title {
  margin: 0 0 12px;
  font-family: var(--rk-font-head);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
}

.ks-case__site {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--rk-link);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.ks-case__site:hover {
  text-decoration: underline;
}

.ks-case__facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.ks-case__facts > div {
  margin: 0;
}

.ks-case__facts dt {
  margin: 0 0 4px;
  color: #7f3ff2;
  font-family: var(--rk-font-head);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ks-case__facts dd {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

.ks-promo {
  padding: 48px 0;
  background: linear-gradient(180deg, #f3f0ff 0%, #f7f8ff 100%);
}

.ks-promo__inner {
  display: grid;
  gap: 24px;
  align-items: center;
}

.ks-promo__title {
  margin: 0 0 12px;
  font-family: var(--rk-font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  color: #111;
}

.ks-promo__text {
  margin: 0 0 18px;
  max-width: 36em;
  color: #444;
  font-size: 16px;
  line-height: 1.55;
}

.ks-promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ks-promo__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ks-promo__trust img {
  display: block;
  max-height: 56px;
  width: auto;
}

.ks-faq-intro {
  margin: 0 0 20px;
  max-width: 40em;
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}

.ks-faq-cta {
  margin-top: 28px;
  padding: 24px;
  border-radius: 14px;
  background: #f7f8ff;
  border: 1px solid #e6e9f5;
}

.ks-faq-cta h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.ks-faq-cta p {
  margin: 0 0 14px;
  color: #444;
  font-size: 14px;
  line-height: 1.5;
}

/* Lightbox */
.ks-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
}

.ks-lightbox[hidden] {
  display: none;
}

.ks-lightbox__dialog {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
}

.ks-lightbox__dialog img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.ks-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

html.ks-pdf-modal-open,
body.ks-pdf-modal-open {
  overflow: hidden;
}

.ks-pdf-modal {
  width: min(94vw, 1400px);
  height: min(92dvh, 1000px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(11, 15, 30, 0.28);
  color: #111;
}

.ks-pdf-modal::backdrop {
  background: rgba(11, 15, 30, 0.72);
}

.ks-pdf-modal__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ks-pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid #e6e9f5;
  background: #f7f8ff;
}

.ks-pdf-modal__title {
  margin: 0;
  min-width: 0;
  font-family: var(--rk-font-head);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.ks-pdf-modal__controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ks-pdf-modal__zoom-label {
  min-width: 3.2em;
  text-align: center;
  font-family: var(--rk-font-head);
  font-size: 13px;
  font-weight: 700;
  color: #223;
}

.ks-pdf-modal__zoom-out,
.ks-pdf-modal__zoom-in,
.ks-pdf-modal__zoom-fit,
.ks-pdf-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font-family: var(--rk-font-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(40, 30, 90, 0.08);
}

.ks-pdf-modal__zoom-out,
.ks-pdf-modal__zoom-in,
.ks-pdf-modal__close {
  font-size: 22px;
}

.ks-pdf-modal__zoom-fit {
  font-size: 13px;
  white-space: nowrap;
}

.ks-pdf-modal__zoom-out:hover,
.ks-pdf-modal__zoom-in:hover,
.ks-pdf-modal__zoom-fit:hover,
.ks-pdf-modal__close:hover {
  background: #f0f4ff;
}

.ks-pdf-modal__zoom-out:focus-visible,
.ks-pdf-modal__zoom-in:focus-visible,
.ks-pdf-modal__zoom-fit:focus-visible,
.ks-pdf-modal__close:focus-visible {
  outline: 2px solid #2084d6;
  outline-offset: 2px;
}

.ks-pdf-modal__zoom-out:disabled,
.ks-pdf-modal__zoom-in:disabled {
  opacity: 0.45;
  cursor: default;
}

.ks-pdf-modal__viewer {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #dfe4ed;
  -webkit-overflow-scrolling: touch;
}

.ks-pdf-modal__status {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 16px;
  background: rgba(223, 228, 237, 0.96);
  color: #334;
  font-family: var(--rk-font-head);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.ks-pdf-modal__status[hidden] {
  display: none;
}

.ks-pdf-modal__status--error {
  color: #8a1f1f;
}

.ks-pdf-modal__pages {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
}

.ks-pdf-modal__page {
  margin: 0;
  background: #fff;
  box-shadow: 0 4px 20px rgba(20, 30, 60, 0.16);
}

.ks-pdf-modal__page canvas {
  display: block;
  max-width: none;
  height: auto;
}

@media (max-width: 767px) {
  .ks-pdf-modal {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ks-pdf-modal__header {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .ks-pdf-modal__title {
    flex: 1 1 100%;
  }

  .ks-pdf-modal__controls {
    width: 100%;
    justify-content: space-between;
  }

  .ks-pdf-modal__zoom-fit {
    flex: 1 1 auto;
  }

  .ks-pdf-modal__pages {
    gap: 12px;
    padding: 12px;
  }
}

@media (min-width: 860px) {
  .ks-hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }

  .ks-case {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: start;
  }

  .ks-promo__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
}

@media (min-width: 1100px) {
  .ks-cases__list {
    gap: 40px;
  }
}
