/* ============================================================
   PRIVACY — privacy.css
   Styles for /privacy/ page (Политика конфиденциальности)
   ============================================================ */

/* ── Page container ─────────────────────────────────────── */

.privacy-page {
  padding: var(--sp-8) 0 var(--sp-16);
}

/* ── Hero ───────────────────────────────────────────────── */

.privacy-hero {
  margin-bottom: var(--sp-10);
}

.privacy-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.privacy-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-success-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.privacy-hero__date {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

.privacy-hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  font-weight: var(--fw-bold);
  color: var(--clr-text-primary);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-4);
}

.privacy-hero__lead {
  font-size: var(--fs-md);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 700px;
}

/* ── Layout: TOC + Content ──────────────────────────────── */

.privacy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
}

@media (min-width: 1024px) {
  .privacy-layout {
    grid-template-columns: 260px 1fr;
    gap: var(--sp-12);
  }
}

/* ── Table of Contents (sidebar) ────────────────────────── */

.privacy-toc {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-2xl);
  padding: var(--sp-6);
  position: sticky;
  top: calc(var(--header-height) + var(--sp-4));
}

.privacy-toc__title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-4);
}

.privacy-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.privacy-toc__link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  text-decoration: none;
  line-height: var(--lh-snug);
  transition: background var(--t-fast), color var(--t-fast);
}

.privacy-toc__link:hover,
.privacy-toc__link:focus-visible {
  background: var(--clr-overlay-hover);
  color: var(--clr-text-primary);
}

.privacy-toc__link.is-active {
  background: var(--clr-success-bg);
  color: var(--clr-success-text);
  font-weight: var(--fw-semibold);
}

.privacy-toc__num {
  display: inline-block;
  width: 1.4em;
  color: var(--clr-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Article body ───────────────────────────────────────── */

.privacy-article {
  min-width: 0;
}

/* ── Section ────────────────────────────────────────────── */

.privacy-section {
  margin-bottom: var(--sp-10);
  scroll-margin-top: calc(var(--header-height) + var(--sp-6));
}

.privacy-section:last-child {
  margin-bottom: 0;
}

.privacy-section__header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--clr-border);
}

.privacy-section__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--clr-success-dark);
  flex-shrink: 0;
}

.privacy-section__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--clr-text-primary);
  line-height: var(--lh-snug);
}

/* ── Paragraphs ─────────────────────────────────────────── */

.privacy-p {
  font-size: var(--fs-base);
  color: var(--clr-text-primary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-4);
}

.privacy-p:last-child {
  margin-bottom: 0;
}

.privacy-p a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}

.privacy-p a:hover {
  color: var(--clr-accent-hover);
}

/* ── Lists ──────────────────────────────────────────────── */

.privacy-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.privacy-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-base);
  color: var(--clr-text-primary);
  line-height: var(--lh-relaxed);
}

.privacy-list__icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-success-dark);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Data category cards ────────────────────────────────── */

.privacy-data-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin: var(--sp-5) 0;
}

@media (min-width: 640px) {
  .privacy-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.privacy-data-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.privacy-data-card:hover {
  border-color: var(--clr-success-border);
  box-shadow: 0 4px 20px var(--clr-success-bg);
}

.privacy-data-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.privacy-data-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-lg);
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-success-dark);
  flex-shrink: 0;
}

.privacy-data-card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  line-height: var(--lh-snug);
}

.privacy-data-card__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.privacy-data-card__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
}

.privacy-data-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-success-dark);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── Third parties table ────────────────────────────────── */

.privacy-third-parties {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
}

.privacy-party-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
}

.privacy-party-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
  flex-shrink: 0;
}

.privacy-party-card__badge--transfer {
  background: var(--clr-warning-bg);
  border: 1px solid var(--clr-warning-border);
  color: var(--clr-warning-text);
}

.privacy-party-card__badge--technical {
  background: var(--clr-info-bg);
  border: 1px solid var(--clr-info-border);
  color: var(--clr-info-text);
}

.privacy-party-card__body {
  min-width: 0;
}

.privacy-party-card__name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-1);
}

.privacy-party-card__desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
}

/* ── Retention table ────────────────────────────────────── */

.privacy-retention {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: var(--sp-5) 0;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.privacy-retention__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.privacy-retention__row:not(:last-child) {
  border-bottom: 1px solid var(--clr-border);
}

.privacy-retention__cell {
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--clr-text-primary);
  line-height: var(--lh-relaxed);
}

.privacy-retention__cell:first-child {
  border-right: 1px solid var(--clr-border);
  color: var(--clr-text-secondary);
}

.privacy-retention__head {
  background: var(--clr-bg-elevated);
}

.privacy-retention__head .privacy-retention__cell {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clr-text-muted);
}

@media (max-width: 479px) {
  .privacy-retention__row {
    grid-template-columns: 1fr;
  }

  .privacy-retention__cell:first-child {
    border-right: none;
    border-bottom: 1px solid var(--clr-border);
  }
}

/* ── Rights grid ────────────────────────────────────────── */

.privacy-rights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin: var(--sp-5) 0;
}

@media (min-width: 640px) {
  .privacy-rights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.privacy-right-card {
  padding: var(--sp-5);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.privacy-right-card:hover {
  border-color: var(--clr-border-accent);
  box-shadow: 0 4px 20px var(--clr-accent-glow);
}

.privacy-right-card__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--clr-accent-glow);
  border: 1px solid var(--clr-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-accent);
  margin-bottom: var(--sp-3);
}

.privacy-right-card__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-2);
  line-height: var(--lh-snug);
}

.privacy-right-card__desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
}

/* ── Callout / notice box ───────────────────────────────── */

.privacy-callout {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-accent);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-5) 0;
}

.privacy-callout--info {
  border-left-color: var(--clr-info);
  background: var(--clr-info-bg);
  border-color: var(--clr-info-border);
}

.privacy-callout--success {
  border-left-color: var(--clr-success-dark);
  background: var(--clr-success-bg);
  border-color: var(--clr-success-border);
}

.privacy-callout__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-2);
}

.privacy-callout__text {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
}

/* ── Security badges ────────────────────────────────────── */

.privacy-security-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
}

@media (min-width: 480px) {
  .privacy-security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .privacy-security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.privacy-security-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
}

.privacy-security-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--clr-success-bg);
  border: 1px solid var(--clr-success-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-success-dark);
  flex-shrink: 0;
}

.privacy-security-item__body {
  min-width: 0;
}

.privacy-security-item__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-1);
}

.privacy-security-item__desc {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  line-height: var(--lh-relaxed);
}

/* ── Contact card ───────────────────────────────────────── */

.privacy-contact-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-2xl);
  margin-top: var(--sp-4);
  transition: border-color var(--t-normal), box-shadow var(--t-normal);
}

.privacy-contact-card:hover {
  border-color: var(--clr-border-accent);
  box-shadow: 0 4px 20px var(--clr-accent-glow);
}

.privacy-contact-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--clr-accent-glow);
  border: 1px solid var(--clr-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-accent);
  flex-shrink: 0;
}

.privacy-contact-card__body {
  min-width: 0;
}

.privacy-contact-card__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-1);
}

.privacy-contact-card__value {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-primary);
  text-decoration: none;
  line-height: var(--lh-snug);
  transition: color var(--t-fast);
}

a.privacy-contact-card__value:hover {
  color: var(--clr-accent);
}

.privacy-contact-card__desc {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  margin-top: var(--sp-1);
}

/* ── Divider ────────────────────────────────────────────── */

.privacy-divider {
  height: 1px;
  background: var(--clr-border);
  margin: var(--sp-8) 0;
  border: none;
}

/* ── Bottom CTA ─────────────────────────────────────────── */

.privacy-cta {
  margin-top: var(--sp-12);
  padding: var(--sp-8) var(--sp-6);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-2xl);
  text-align: center;
}

.privacy-cta__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-3);
}

.privacy-cta__desc {
  font-size: var(--fs-base);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-6);
}

.privacy-cta__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

@media (min-width: 480px) {
  .privacy-cta__buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* ── Dark theme overrides ───────────────────────────────── */

[data-theme="dark"] .privacy-toc {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .privacy-data-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-data-card:hover {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .privacy-party-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-retention {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-right-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-security-item {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-contact-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .privacy-contact-card:hover {
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .privacy-callout {
  border-color: var(--clr-border);
}

[data-theme="dark"] .privacy-callout--info {
  border-color: var(--clr-info-border);
}

[data-theme="dark"] .privacy-callout--success {
  border-color: var(--clr-success-border);
}

[data-theme="dark"] .privacy-cta {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ── Mobile adaptations ─────────────────────────────────── */

@media (max-width: 1023px) {
  .privacy-toc {
    position: static;
    margin-bottom: var(--sp-6);
  }
}

@media (max-width: 767px) {
  .privacy-page {
    padding: var(--sp-6) 0 var(--sp-12);
  }

  .privacy-section__title {
    font-size: var(--fs-lg);
  }

  .privacy-contact-card {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .privacy-toc {
    padding: var(--sp-4);
  }

  .privacy-party-card {
    flex-direction: column;
    gap: var(--sp-3);
  }
}
