/**
 * Actuskom interior pages — legal layouts and 404.
 *
 * @package actuskom
 */

/* ===== Legal pages ===== */

.ak-legal-hero {
  padding: 140px 0 48px;
}

.ak-legal-hero__inner {
  max-width: 760px;
}

.ak-legal-hero h1 {
  margin: 10px 0 0;
  font-family: var(--ak-font-title);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.ak-legal-hero__lead {
  margin: 22px 0 0;
  max-width: 640px;
  color: var(--ak-muted);
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 700;
  line-height: 1.5;
}

.ak-legal-page {
  padding: 0 0 96px;
}

.ak-legal-content {
  width: min(100%, 920px);
  margin-inline: auto;
  padding: 40px 36px 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(91, 44, 157, 0.16), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(99, 186, 171, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.02);
}

.ak-legal-content > :first-child {
  margin-top: 0;
}

.ak-legal-content h2 {
  margin: 48px 0 16px;
  font-family: var(--ak-font-title);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.ak-legal-content h2:first-child {
  margin-top: 0;
}

.ak-legal-content h3 {
  margin: 28px 0 10px;
  font-family: var(--ak-font-title);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ak-legal-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 1.6vw, 16px);
  font-weight: 600;
  line-height: 1.7;
}

.ak-legal-content ul,
.ak-legal-content ol {
  margin: 0 0 22px;
  padding-left: 1.35rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 1.6vw, 16px);
  font-weight: 600;
  line-height: 1.65;
}

.ak-legal-content li + li {
  margin-top: 10px;
}

.ak-legal-content li::marker {
  color: var(--ak-secondary);
}

.ak-legal-content a {
  color: var(--ak-secondary);
  text-decoration: underline;
  text-decoration-color: rgba(99, 186, 171, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ak-ease), text-decoration-color 0.2s var(--ak-ease);
}

.ak-legal-content a:hover {
  color: #8fd4c9;
  text-decoration-color: rgba(143, 212, 201, 0.8);
}

.ak-legal-content strong {
  color: var(--ak-white);
  font-weight: 800;
}

.ak-legal-content__table-wrap {
  margin: 0 0 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.ak-legal-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.ak-legal-table th,
.ak-legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
  color: rgba(255, 255, 255, 0.88);
}

.ak-legal-table th {
  font-family: var(--ak-font-title);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ak-white);
  background: rgba(91, 44, 157, 0.22);
}

.ak-legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.ak-legal-table td em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.72);
}

.ak-legal-table a {
  word-break: break-word;
}

/* ===== 404 page ===== */

.ak-error-page {
  padding: 120px 0 88px;
}

.ak-error-page__inner {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: min(52vh, 520px);
}

.ak-error-page__visual {
  display: flex;
  justify-content: center;
}

.ak-error-page__card {
  width: min(100%, 260px);
  padding: 16px;
  border: 1px solid rgba(91, 44, 157, 0.55);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(91, 44, 157, 0.28), transparent 42%),
    radial-gradient(circle at 90% 18%, rgba(99, 186, 171, 0.16), transparent 40%),
    rgba(13, 10, 26, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.ak-error-page__card-bar {
  display: flex;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ak-error-page__card-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.ak-error-page__card-body {
  position: relative;
  padding-top: 18px;
  min-height: 150px;
}

.ak-error-page__signal {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.ak-error-page__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ak-error-page__dot--ok {
  background: rgba(99, 186, 171, 0.85);
  box-shadow: 0 0 12px rgba(99, 186, 171, 0.45);
}

.ak-error-page__dot--lost {
  background: rgba(91, 44, 157, 0.9);
  box-shadow: 0 0 14px rgba(91, 44, 157, 0.5);
  animation: ak-error-pulse 2.4s ease-in-out infinite;
}

.ak-error-page__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 78%;
}

.ak-error-page__grid span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.ak-error-page__grid-gap {
  background: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(99, 186, 171, 0.35);
}

.ak-error-page__orbit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 72px;
  height: 72px;
  border: 1px dashed rgba(99, 186, 171, 0.35);
  border-radius: 999px;
}

.ak-error-page__orbit::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 999px;
  background: var(--ak-secondary);
  box-shadow: 0 0 10px rgba(99, 186, 171, 0.55);
}

.ak-error-page__content {
  max-width: 560px;
}

.ak-error-page h1 {
  margin: 10px 0 0;
  font-family: var(--ak-font-title);
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.ak-error-page__lead {
  margin: 22px 0 0;
  color: var(--ak-muted);
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 700;
  line-height: 1.5;
}

.ak-error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.ak-error-page__actions .ak-button {
  margin-top: 0;
}

@keyframes ak-error-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.88);
  }
}

@media (max-width: 1024px) {
  .ak-legal-hero {
    padding-top: 120px;
  }

  .ak-error-page__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ak-error-page__content {
    margin-inline: auto;
  }

  .ak-error-page__actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .ak-legal-content {
    padding: 28px 22px 32px;
    border-radius: 22px;
  }

  .ak-legal-content ul,
  .ak-legal-content ol {
    padding-left: 1.15rem;
  }

  .ak-error-page {
    padding: 108px 0 72px;
  }

  .ak-error-page__inner {
    min-height: 0;
  }
}

@media (max-width: 393px) {
  .ak-error-page__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ak-error-page__actions .ak-button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-error-page__dot--lost {
    animation: none;
  }
}

/* ===== Clients carousel ===== */

.ak-clients {
  padding: 72px 0 88px;
  overflow: hidden;
}

.ak-clients__intro {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--ak-muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.ak-clients__marquee {
  position: relative;
  width: 100%;
  margin-top: 40px;
  overflow: hidden;
  background: #ffffff;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.ak-clients__track {
  display: flex;
  width: max-content;
  flex-wrap: nowrap;
  will-change: transform;
  animation: ak-clients-marquee 84s linear infinite;
  --ak-clients-loop: 25%;
}

.ak-clients__list {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  margin: 0;
  padding: 20px 32px;
  list-style: none !important;
  list-style-type: none !important;
}

.ak-clients__item {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  list-style: none !important;
  list-style-type: none !important;
}

.ak-clients__item::marker {
  content: none;
  display: none;
}

.ak-clients__item img {
  width: auto;
  max-width: 160px;
  max-height: 48px;
  object-fit: contain;
  opacity: 1;
  filter: none;
  transition: opacity 0.25s var(--ak-ease);
}

.ak-clients__item img:hover {
  opacity: 0.85;
}

@keyframes ak-clients-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-1 * var(--ak-clients-loop)), 0, 0);
  }
}

@media (max-width: 768px) {
  .ak-clients {
    padding: 56px 0 72px;
  }

  .ak-clients__item img {
    max-width: 120px;
    max-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-clients__marquee {
    mask-image: none;
  }

  .ak-clients__track {
    width: 100%;
    animation: none;
    justify-content: center;
  }

  .ak-clients__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 32px;
    width: 100%;
    max-width: var(--ak-container);
    margin-inline: auto;
    padding: 20px 24px;
  }

  .ak-clients__list + .ak-clients__list {
    display: none;
  }
}

/* ===== AI services module ===== */

.ak-ai-services {
  padding: 88px 0;
}

.ak-ai-services__subtitle {
  max-width: 680px;
  margin: 16px 0 0;
  color: var(--ak-muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.ak-ai-services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.ak-ai-services__card {
  padding: 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(91, 44, 157, 0.18), transparent 58%),
    rgba(255, 255, 255, 0.02);
}

.ak-ai-services__card h3 {
  margin: 0;
  font-family: var(--ak-font-title);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ak-ai-services__card p {
  margin: 12px 0 0;
  color: var(--ak-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.ak-ai-services__cta {
  margin: 36px 0 0;
  text-align: center;
}

.ak-ai-services__cta .ak-button {
  margin-top: 0;
  max-width: min(100%, 520px);
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .ak-ai-services {
    padding: 64px 0;
  }

  .ak-ai-services__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ===== About — regional presence ===== */

.ak-presence {
  padding: 0 0 72px;
  text-align: center;
}

.ak-presence__eyebrow {
  margin-bottom: 12px;
}

.ak-presence__text {
  width: min(100%, 720px);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  line-height: 1.55;
}

/* ===== Product — preview image area ===== */

.ak-product-card__media .ak-product-preview--placeholder {
  min-height: 220px;
}

.ak-product-preview {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(91, 44, 157, 0.22), transparent 42%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.ak-product-preview__image {
  width: 100%;
  height: auto;
  display: block;
}

.ak-product-preview--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 32px;
  border-style: dashed;
  border-color: rgba(99, 186, 171, 0.35);
}

.ak-product-preview__label {
  margin: 0;
  color: var(--ak-muted);
  font-family: var(--ak-font-title);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ===== Product — licensing panel ===== */

.ak-licensing__panel {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 36px 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 44, 157, 0.2), transparent 50%),
    rgba(255, 255, 255, 0.02);
}

.ak-licensing__panel .ak-licensing__lead {
  margin: 0;
  width: 100%;
  text-align: center;
}

.ak-licensing__support {
  margin: 20px 0 0;
  color: var(--ak-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.ak-licensing__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.ak-licensing__actions .ak-button {
  margin-top: 0;
}

@media (max-width: 768px) {
  .ak-licensing__panel {
    padding: 28px 22px;
  }

  .ak-licensing__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ak-product-preview--placeholder {
    min-height: 220px;
  }
}
