/* Norte legal pages — shared styles.
 *
 * Standalone (not part of the Vite/TS bundle). These pages live in
 * /public/{terms,privacy,termos,privacidade}/index.html and load this
 * stylesheet directly so they don't depend on the main app build hash.
 *
 * Brand tokens are inlined here (not @imported from @norte/brand) because
 * /public assets are copied verbatim — there's no CSS pipeline.
 */

/* ── Brand tokens (mirror of packages/brand/tokens.css) ────────────────── */
:root {
  --paper: #F6F4EF;
  --bg: #EFEDE8;
  --linen: #EFEDE8;
  --bg-2: #E6E3DC;
  --bg-3: #DCD8D0;

  --ink: #1A1A1A;
  --ink-1: #2A2A2A;
  --ink-2: #6F6C66;
  --ink-3: #A8A49C;
  --ink-4: #C9C5BD;
  --ink-lead: #4A4844;

  --line: #D3CFC6;
  --line-2: #BFBAB0;

  --sage: #7A8B6F;
  --sage-soft: #DDE4D6;

  --display: 'Archivo', 'Helvetica Neue', Helvetica, sans-serif;
  --body: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }

/* ── Top nav ───────────────────────────────────────────────────────────── */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.legal-nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.legal-nav .brand .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.legal-nav .back {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-lead);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease;
}
.legal-nav .back:hover { color: var(--ink); }

/* ── Page layout ───────────────────────────────────────────────────────── */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 100px;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.legal-header {
  margin-bottom: 72px;
}
.legal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.legal-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}
.legal-header h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--ink);
  max-width: 18ch;
}
.legal-header h1 .it {
  font-style: italic;
  font-weight: 500;
  color: var(--ink-2);
}
.legal-meta {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legal-meta strong {
  color: var(--ink);
  font-weight: 500;
  margin-left: 8px;
}

/* ── Sections ──────────────────────────────────────────────────────────── */
.legal-section {
  padding-top: 56px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.legal-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.legal-section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 16px;
}
.legal-section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 28px;
}
.legal-section h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
  margin: 36px 0 12px;
}
.legal-section p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-lead);
  margin-bottom: 18px;
  max-width: 64ch;
}
.legal-section p strong {
  color: var(--ink);
  font-weight: 600;
}
.legal-section p em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}
.legal-section a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.legal-section a:hover { text-decoration-color: var(--ink); }
.legal-section ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.legal-section ul li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-lead);
  margin-bottom: 10px;
  max-width: 64ch;
}
.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 1px;
  background: var(--ink-3);
}
.legal-section ul li strong {
  color: var(--ink);
  font-weight: 600;
}

/* Numbered steps (e.g. in-app deletion walkthrough). Counter is rendered in
   the display face on the linen panel — gives the procedure a quiet weight
   without yelling. */
.legal-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 4px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.legal-steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 0 14px 56px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  border-top: 1px solid var(--line);
  max-width: 60ch;
}
.legal-steps li:first-child { border-top: none; }
.legal-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  width: 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

/* Block-style label rows used in the data sections */
.legal-block {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-lead);
}
.legal-block:last-of-type { border-bottom: 1px solid var(--line); }
.legal-block dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 3px;
}
.legal-block dd { margin: 0; max-width: 60ch; }
.legal-block dd strong { color: var(--ink); font-weight: 600; }

/* Definitions list (Terms §1) */
.legal-definitions {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.legal-definitions > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.legal-definitions dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal-definitions dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-lead);
  max-width: 60ch;
}

/* Third-party services table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.legal-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 12px;
}
.legal-table td {
  color: var(--ink-lead);
}
.legal-table td.svc {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* Tagline note (used in "short version" callout) */
.legal-callout {
  margin: 24px 0 32px;
  padding: 22px 24px;
  background: var(--bg);
  border-left: 2px solid var(--sage);
  border-radius: 4px;
}
.legal-callout p {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  max-width: none;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.legal-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.legal-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legal-footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.legal-footer-links a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease;
}
.legal-footer-links a:hover { color: var(--ink); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .legal { padding: 56px 24px 72px; }
  .legal-nav-inner { padding: 16px 24px; }
  .legal-header { margin-bottom: 56px; }
  .legal-section { padding-top: 44px; margin-top: 44px; }
  .legal-meta { gap: 18px; flex-direction: column; }
  .legal-block { grid-template-columns: 1fr; gap: 6px; }
  .legal-definitions > div { grid-template-columns: 1fr; gap: 6px; }
  .legal-table { font-size: 13px; }
  .legal-table th, .legal-table td { padding: 10px 8px; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
}
