:root {
  --ak-category-ink: #132a3f;
  --ak-category-coral: #f05a67;
  --ak-category-mist: #edf4f5;
  --ak-category-paper: #ffffff;
  --ak-category-muted: #667786;
}

.page-ak-categories {
  background: #f4f7f8;
}

.ak-category-page {
  min-height: calc(100vh - 160px);
  padding: 28px 16px 96px;
  color: var(--ak-category-ink);
}

.ak-category-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.ak-category-hero {
  position: relative;
  display: flex;
  min-height: 230px;
  margin-bottom: 22px;
  padding: 32px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .12), transparent 26%),
    var(--ak-category-ink);
  color: #fff;
  box-shadow: 0 18px 46px rgba(19, 42, 63, .17);
}

.ak-category-hero::after {
  position: absolute;
  right: -76px;
  bottom: -112px;
  width: 260px;
  height: 260px;
  border: 44px solid rgba(240, 90, 103, .2);
  border-radius: 50%;
  content: "";
}

.ak-category-hero__content {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 620px;
}

.ak-category-eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #e8f2f3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.ak-category-hero h1 {
  max-width: 520px;
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.ak-category-hero p {
  margin: 14px 0 20px;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  line-height: 1.7;
}

.ak-category-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.ak-category-count i {
  color: #ff8993;
  font-size: 16px;
}

.ak-category-hero__mark {
  position: absolute;
  z-index: 1;
  top: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 8px;
}

.ak-category-hero__mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}

.ak-category-hero__mark span:nth-child(2),
.ak-category-hero__mark span:nth-child(4),
.ak-category-hero__mark span:nth-child(6) {
  background: var(--ak-category-coral);
}

.ak-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ak-category-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(19, 42, 63, .07);
  border-radius: 20px;
  background: var(--ak-category-paper);
  box-shadow: 0 8px 24px rgba(19, 42, 63, .07);
  transition: transform .25s ease, box-shadow .25s ease;
}

.ak-category-card__visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #e9f1f2;
}

.ak-category-card:nth-child(3n + 2) .ak-category-card__visual {
  background: #f8edef;
}

.ak-category-card:nth-child(3n + 3) .ak-category-card__visual {
  background: #eef0f7;
}

.ak-category-card__visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(19, 42, 63, .08));
  content: "";
  pointer-events: none;
}

.ak-category-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease;
}

.ak-category-card__body {
  padding: 17px 18px 19px;
}

.ak-category-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ak-category-ink);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.ak-category-card__title svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 5px;
  border-radius: 50%;
  background: var(--ak-category-mist);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.ak-category-card__browse {
  display: inline-block;
  margin-top: 8px;
  color: var(--ak-category-muted);
  font-size: 12px;
  text-decoration: none;
}

.ak-category-card__children {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.ak-category-card__children a {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ak-category-mist);
  color: #536774;
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
}

.ak-category-card a:focus-visible,
.ak-category-empty a:focus-visible {
  outline: 3px solid rgba(240, 90, 103, .35);
  outline-offset: 3px;
}

.ak-category-empty {
  padding: 64px 20px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}

.ak-category-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--ak-category-mist);
  color: var(--ak-category-coral);
  font-size: 26px;
}

.ak-category-empty h2 {
  margin: 0 0 8px;
  color: var(--ak-category-ink);
  font-size: 22px;
}

.ak-category-empty p {
  margin: 0 0 20px;
  color: var(--ak-category-muted);
}

.ak-category-empty a {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ak-category-ink);
  color: #fff;
  text-decoration: none;
}

@media (hover: hover) {
  .ak-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(19, 42, 63, .12);
  }

  .ak-category-card:hover .ak-category-card__visual img {
    transform: scale(1.035);
  }

  .ak-category-card__title:hover {
    color: var(--ak-category-coral);
  }

  .ak-category-card__title:hover svg {
    transform: translateX(2px);
    background: var(--ak-category-coral);
    color: #fff;
  }

  .ak-category-card__children a:hover {
    background: var(--ak-category-ink);
    color: #fff;
  }
}

@media (max-width: 767.98px) {
  .ak-category-page {
    padding: 12px 12px calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .ak-category-hero {
    min-height: 210px;
    margin-bottom: 14px;
    padding: 24px 22px;
    border-radius: 20px;
  }

  .ak-category-hero h1 {
    max-width: 270px;
    font-size: 30px;
  }

  .ak-category-hero p {
    max-width: 265px;
    margin: 12px 0 17px;
    font-size: 13px;
  }

  .ak-category-hero__mark {
    top: 22px;
    right: 20px;
    grid-template-columns: repeat(2, 8px);
    gap: 7px;
  }

  .ak-category-hero__mark span {
    width: 8px;
    height: 8px;
  }

  .ak-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ak-category-card {
    border-radius: 16px;
  }

  .ak-category-card__visual {
    aspect-ratio: 1 / 1;
  }

  .ak-category-card__body {
    padding: 13px 13px 15px;
  }

  .ak-category-card__title {
    gap: 6px;
    font-size: 15px;
  }

  .ak-category-card__title svg {
    width: 20px;
    height: 20px;
    padding: 5px;
  }

  .ak-category-card__browse {
    margin-top: 5px;
    font-size: 11px;
  }

  .ak-category-card__children {
    gap: 5px;
    margin-top: 9px;
  }

  .ak-category-card__children a {
    padding: 5px 8px;
    font-size: 11px;
  }
}

@media (max-width: 359.98px) {
  .ak-category-grid {
    grid-template-columns: 1fr;
  }

  .ak-category-card__visual {
    aspect-ratio: 16 / 10;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-category-card,
  .ak-category-card__visual img,
  .ak-category-card__title svg {
    transition: none;
  }
}
