/* ============================================================
   The Pawlure — Legal pages (Privacy / Terms / Refunds)
   Self-contained stylesheet, built on top of design-system.css.
   No dependency on main.js (no scroll-reveal classes used here).
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ── Header (logo only — mirrors .landing-logo / .landing-top-gradient
   on the main landing page exactly: fixed + centered, not flow-based) ── */

.legal-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    var(--bg-base) 0%,
    rgba(13, 11, 8, 0.88) 28%,
    rgba(13, 11, 8, 0.45) 60%,
    transparent 100%
  );
  z-index: 50;
  pointer-events: none;
}

.legal-header-inner {
  /* No longer positions anything — .legal-logo is fixed independently. */
  display: contents;
}

.legal-logo {
  position: fixed;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  line-height: 0;
  /* .legal-header has pointer-events:none (so the gradient doesn't block
     clicks on content below); without this, .legal-logo inherits that
     none and becomes unclickable. */
  pointer-events: auto;
}

.legal-logo svg {
  display: block;
  width: 142px;
  height: 40px;
}

/* ── Main content ── */

.legal-main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  /* Top clearance replicates the old in-flow header box (120px) + the
     original space-8 gap, since the logo/gradient are now fixed and no
     longer push content down via normal flow. */
  padding: calc(120px + var(--space-8)) 24px var(--space-15);
  box-sizing: border-box;
}

.legal-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--font-size-section-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-serif-semibold);
  line-height: var(--line-height-h2);
  letter-spacing: var(--letter-spacing-h2);
  color: var(--text-primary);
  margin: 0 0 12px;
  text-align: center;
}

.legal-updated {
  font-family: var(--font-sans);
  font-size: var(--font-size-caption);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-8);
  text-align: center;
}

.legal-intro {
  font-family: var(--font-sans);
  font-size: var(--font-size-body-large);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 var(--space-8);
}

/* ── "Your Privacy Choices" callout (US opt-out entry, CPRA) ──
   Заметный блок вверху Privacy Policy вместо отдельного пункта футера. */
.legal-callout {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0 0 var(--space-8);
  background: rgba(255, 255, 255, 0.02);
}

.legal-callout h2 {
  font-family: var(--font-serif);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-serif-semibold);
  line-height: var(--line-height-h4);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.legal-callout p {
  font-family: var(--font-sans);
  font-size: var(--font-size-body-large);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

/* Кремовая заливка (не золото — золото зарезервировано под главный CTA),
   зеркалит .cookie-consent-btn-primary. */
.legal-choices-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: var(--font-size-nav-link);
  font-weight: 600;
  color: var(--bg-base);
  background: var(--text-primary);
  border: 1px solid var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.legal-choices-btn:hover {
  opacity: 0.88;
  color: var(--bg-base);
}

/* Ghost-вариант («Opt out» / «Decline») — зеркалит .cookie-consent-btn-ghost.
   Бордер --border-medium (не --border-subtle): на тёмном фоне subtle почти
   сливался, а opt-out — заметный CPRA-контрол, кнопка должна читаться. Токен
   из дизайн-системы; hover поднимает бордер до --text-secondary (шаг выше). */
.legal-choices-btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

.legal-choices-btn-ghost:hover {
  opacity: 1;
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.legal-choices-btn:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* Текущее состояние выбора над кнопками. */
.legal-choices-status {
  font-family: var(--font-sans);
  font-size: var(--font-size-body-medium);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.legal-choices-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 600px) {
  .legal-callout p {
    font-size: var(--font-size-body-medium);
  }
}

.legal-section {
  margin: 0 0 var(--space-8);
}

.legal-section:last-of-type {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-serif-semibold);
  line-height: var(--line-height-h4);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
}

.legal-section p {
  font-family: var(--font-sans);
  font-size: var(--font-size-body-large);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

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

.legal-section ul {
  margin: 0 0 var(--space-3);
  padding-left: 22px;
}

.legal-section li {
  font-family: var(--font-sans);
  font-size: var(--font-size-body-large);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section a {
  color: var(--gold-primary);
  text-decoration: underline;
  text-decoration-color: var(--gold-muted);
  transition: color var(--transition-fast);
}

.legal-section a:hover {
  color: var(--gold-light);
}

@media (max-width: 600px) {
  .legal-main {
    /* Top clearance must stay — logo/gradient are fixed, not in flow.
       Only side/bottom padding changes on mobile. */
    padding: calc(120px + var(--space-8)) 20px var(--space-10);
  }
  .legal-section p,
  .legal-section li {
    font-size: var(--font-size-body-medium);
  }
}

/* ── Footer (mirrors .landing-footer, without scroll-reveal) ── */

.legal-footer {
  flex-shrink: 0;
  padding: 48px 0 32px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.legal-footer .footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 8px;
}

.legal-footer .footer-link {
  font-family: var(--font-sans);
  font-size: var(--font-size-nav-link);
  font-weight: 400;
  color: var(--text-disabled);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.legal-footer .footer-link:hover {
  color: var(--text-tertiary);
}

/* Current-page link — no longer highlighted (used to match the hover
   color permanently); reads as a plain, non-clickable label instead. */
.legal-footer .footer-link--current {
  color: var(--text-disabled);
  pointer-events: none;
}

.legal-footer .footer-sep {
  font-size: 14px;
  color: var(--text-disabled);
  margin: 0 12px;
  user-select: none;
}

/* Copyright line — same size and color as the nav links above it.
   --text-disabled is already the dimmest token in the palette, so no
   extra opacity is needed to keep this quiet; stacking one on top of
   the other just hurt legibility without adding hierarchy. */
.legal-footer .footer-copy {
  font-family: var(--font-sans);
  font-size: var(--font-size-nav-link);
  font-weight: 400;
  color: var(--text-disabled);
  line-height: 1;
  margin: 32px 0 0;
}
