/* ============================================================
   VELIORA — Legal Pages
   ============================================================ */

/* ── LEGAL HERO ── */
.legal-hero {
  padding-top: calc(var(--space-32) + 80px);
  padding-bottom: var(--space-16);
  background-color: var(--color-bg-dark);
}
.legal-hero__inner {
  max-width: 820px;
}
.legal-hero__title {
  color: var(--color-white);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  margin-bottom: var(--space-6);
  line-height: var(--leading-snug);
}
.legal-hero__lead {
  color: rgba(255,255,255,0.55);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
}
.legal-meta__item {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.legal-meta__item strong {
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.legal-meta__sep {
  width: 1px;
  height: 16px;
  background-color: rgba(255,255,255,0.15);
}
.legal-review-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: 1px solid rgba(184,149,106,0.4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-accent-light);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.legal-review-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

/* ── NOTICE BOXES ── */
.notice-box {
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-12);
}
.notice-box--core {
  background-color: var(--color-bg-dark);
  border: 1px solid var(--color-border-dark);
}
.notice-box--core .notice-box__title {
  color: var(--color-white);
  font-family: var(--font-editorial);
  font-size: var(--text-2xl);
  font-weight: 300;
  margin-bottom: var(--space-4);
}
.notice-box--core .notice-box__body {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.notice-box--tinted {
  background-color: var(--color-bg-section);
  border: 1px solid var(--color-border);
}
.notice-box--tinted .notice-box__title {
  color: var(--color-primary);
  font-family: var(--font-editorial);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-3);
}
.notice-box--tinted .notice-box__body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.notice-box--inactive {
  background-color: transparent;
  border: 1px dashed var(--color-border);
  opacity: 0.7;
}
.notice-box--inactive .notice-box__title {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  font-weight: 500;
  margin-bottom: var(--space-3);
}
.notice-box--inactive .notice-box__body {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.notice-box__tag {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

/* ── ENTITY TABLE ── */
.entity-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.entity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.entity-table thead {
  background-color: var(--color-bg-dark);
}
.entity-table thead th {
  padding: var(--space-5) var(--space-6);
  text-align: left;
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  border-bottom: 1px solid var(--color-border-dark);
}
.entity-table thead th:first-child {
  color: rgba(255,255,255,0.35);
  width: 28%;
}
.entity-table thead th:nth-child(2) { color: var(--color-accent-light); }
.entity-table thead th:nth-child(3) { color: rgba(255,255,255,0.75); }
.entity-table tbody tr { border-bottom: 1px solid var(--color-border); }
.entity-table tbody tr:last-child { border-bottom: none; }
.entity-table tbody tr:nth-child(even) { background-color: var(--color-bg-section); }
.entity-table tbody td {
  padding: var(--space-4) var(--space-6);
  vertical-align: top;
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}
.entity-table tbody td:first-child {
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* ── POLICY SECTIONS ── */
.policy-body {
  max-width: 820px;
}
.policy-section {
  padding-bottom: var(--space-12);
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}
.policy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.policy-section__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.policy-section__num {
  font-family: var(--font-editorial);
  font-size: var(--text-3xl);
  color: var(--color-accent);
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.5ch;
}
.policy-section__title {
  font-family: var(--font-editorial);
  font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));
  font-weight: 400;
  color: var(--color-primary);
  line-height: var(--leading-snug);
}
.policy-section p {
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}
.policy-section p:last-child { margin-bottom: 0; }
.policy-section ul,
.policy-section ol {
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  font-size: var(--text-base);
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.policy-section strong {
  color: var(--color-text);
  font-weight: 500;
}
.policy-section h4 {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-primary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

/* ── STEP LIST ── */
.step-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
  counter-reset: step-counter;
}
.step-list__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-bg-section);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}
.step-list__num {
  font-family: var(--font-editorial);
  font-size: var(--text-xl);
  color: var(--color-accent);
  font-weight: 300;
  line-height: 1.2;
  flex-shrink: 0;
  min-width: 2ch;
}
.step-list__text {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.step-list__text strong {
  display: block;
  font-size: var(--text-base);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

/* ── LANGUAGE BADGE ── */
.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}
.lang-badge--es {
  background-color: rgba(184,149,106,0.12);
  color: var(--color-accent);
  border: 1px solid rgba(184,149,106,0.25);
}
.lang-badge--en {
  background-color: rgba(44,44,44,0.06);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ── TOC (Table of Contents) ── */
.legal-toc {
  background-color: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-10);
  margin-bottom: var(--space-16);
}
.legal-toc__title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}
.legal-toc__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  columns: 2;
}
.legal-toc__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  break-inside: avoid;
}
.legal-toc__link:hover { color: var(--color-accent); }
.legal-toc__link:hover::before {
  content: '→ ';
}

/* ── LEGAL NAV (category bar) ── */
.legal-nav {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg-section);
}
.legal-nav__inner {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  white-space: nowrap;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  flex-wrap: wrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .legal-toc__list { columns: 1; }
  .notice-box { padding: var(--space-6); }
  .entity-table tbody td, .entity-table thead th { padding: var(--space-3) var(--space-4); }
  .policy-section__header { flex-direction: column; gap: var(--space-2); }
  .policy-section__num { font-size: var(--text-2xl); }
}
