/* ===== PRIVACY POLICY MODAL =====
   Full-screen modal triggered by the "Политика конфиденциальности" link in
   the footer. Visual language mirrors .product-modal (blurred backdrop,
   centered white card, GSAP fade+scale entrance) but it lives in its own
   namespace because the semantic content (a static legal document) is
   unrelated to product info. */

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 60500; /* sits above product-modal so a stacked Esc closes this first */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.privacy-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

/* Backdrop — blurred, semi-opaque. GSAP owns opacity. */
.privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
}

/* Content card — narrower than product modal (text-only document). */
.privacy-modal-content {
  position: relative;
  width: 92%;
  max-width: 720px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  padding: clamp(32px, 4vw, 56px);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  opacity: 0;
  transform: scale(0.94);
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* Hide scrollbar inside modal — match global aesthetic */
.privacy-modal-content::-webkit-scrollbar { width: 0; }
.privacy-modal-content { scrollbar-width: none; }

/* Close button — circular, top-right, matches .product-modal-close */
.privacy-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s var(--ease-expo), background 0.4s var(--ease-expo);
}
.privacy-modal-close:hover {
  transform: rotate(90deg);
  background: #fff;
}

/* Title — Cormorant 300, large display */
.privacy-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--dark);
  margin: 0 0 24px;
  padding-right: 56px; /* avoid overlap with close button */
}

/* Body — DM Sans 300, comfortable reading width */
.privacy-modal-body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--text);
}

.privacy-modal-body p {
  margin: 0 0 1em;
}
.privacy-modal-body p:last-child {
  margin-bottom: 0;
}

/* Headings inside the parsed markdown */
.privacy-modal-body h2,
.privacy-modal-body h3,
.privacy-modal-body h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--dark);
  line-height: 1.2;
  margin: 1.6em 0 0.6em;
}
.privacy-modal-body h2 { font-size: clamp(24px, 2.6vw, 30px); }
.privacy-modal-body h3 { font-size: clamp(20px, 2.2vw, 24px); }
.privacy-modal-body h4 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.8em 0 0.5em;
}
/* No top margin on the very first child — the title already owns the gap */
.privacy-modal-body > *:first-child { margin-top: 0; }

/* Lists */
.privacy-modal-body ul,
.privacy-modal-body ol {
  padding-left: 1.5em;
  margin: 0 0 1em;
}
.privacy-modal-body li {
  margin-bottom: 0.4em;
}

/* Inline emphasis */
.privacy-modal-body strong {
  font-weight: 500;
  color: var(--dark);
}
.privacy-modal-body em {
  font-style: italic;
}

/* Links */
.privacy-modal-body a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.4s var(--ease-expo);
  border-bottom: 1px solid transparent;
}
.privacy-modal-body a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

/* ===== FOOTER TRIGGER ===== */
/* Strip native button styling so it visually matches the surrounding
   <a> elements in .footer-bottom. */
.privacy-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: #555;
  cursor: pointer;
  transition: color 0.4s var(--ease-expo);
}
.privacy-link:hover {
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .privacy-modal-content {
    max-height: 90vh;
    padding: 20px;
    border-radius: 12px;
  }
  .privacy-modal-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .privacy-modal-title {
    font-size: 26px;
    margin-bottom: 18px;
    padding-right: 44px;
  }
  .privacy-modal-body {
    font-size: 14px;
    line-height: 1.65;
  }
  .privacy-modal-body h2 { font-size: 22px; }
  .privacy-modal-body h3 { font-size: 19px; }
  .privacy-modal-body h4 { font-size: 13px; }
}
