/* ============================================================
   PACTLY — LEGAL PAGES (Terms, Privacy, etc.)
   ============================================================ */

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

:root {
  --blue: #4F6BFF;
  --blue-h: #3B54E8;
  --mid: #0D1B3E;
  --mist: #F4F7FC;
  --bdr: #E5E7EB;
  --muted: #7C869A;
  --slate: #4B5468;
  --white: #FFFFFF;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-family: var(--font); -webkit-font-smoothing: antialiased; background: var(--mist); color: var(--mid); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; font-weight: 600; }
a:hover { color: var(--blue-h); text-decoration: underline; }

/* --- Header --- */
.legal-header { position: sticky; top: 0; z-index: 50; background: rgba(244,247,252,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--bdr); }
.legal-header__inner { max-width: 760px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
.legal-header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.legal-header__logo img { height: 36px; width: 36px; border-radius: 8px; }
.legal-header__wordmark { font-size: 20px; font-weight: 700; color: var(--mid); letter-spacing: -.02em; }
.legal-header__back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--slate); text-decoration: none; padding: 6px 14px; border-radius: 8px; transition: .2s; }
.legal-header__back:hover { color: var(--mid); background: rgba(13,27,62,.04); text-decoration: none; }

/* --- Main --- */
.legal-main { flex: 1; padding: 40px 24px 80px; }
.legal-container { max-width: 720px; margin: 0 auto; }

/* --- Hero --- */
.legal-hero { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--bdr); }
.legal-hero__title { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--mid); line-height: 1.2; }
.legal-hero__subtitle { font-size: 16px; font-weight: 600; color: var(--blue); margin-top: 8px; }
.legal-hero__meta { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* --- Content --- */
.legal-content { line-height: 1.75; font-size: 15px; color: var(--slate); }

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--mid);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--bdr);
  letter-spacing: -.01em;
}

.legal-content h2:first-of-type {
  margin-top: 32px;
  border-top: none;
  padding-top: 0;
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--mid);
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content p {
  margin-bottom: 14px;
}

.legal-content ol,
.legal-content ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.legal-content strong {
  color: var(--mid);
  font-weight: 600;
}

/* --- Company card --- */
.legal-company-card {
  background: var(--white);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 16px 0 20px;
  box-shadow: 0 2px 8px rgba(13,27,62,.04);
}

.legal-company-card p {
  margin-bottom: 4px;
  font-size: 14px;
}

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

/* --- Footer --- */
.legal-footer {
  border-top: 1px solid var(--bdr);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.legal-footer__company {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.legal-footer__links {
  margin-top: 8px;
}

.legal-footer__links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.legal-footer__links a:hover {
  color: var(--blue);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .legal-hero__title { font-size: 26px; }
  .legal-content h2 { font-size: 18px; margin-top: 36px; }
  .legal-main { padding: 28px 16px 60px; }
}

@media (max-width: 480px) {
  .legal-hero__title { font-size: 22px; }
  .legal-header__back span { display: none; }
}
