/* ============================================
   STEPLEAD · LEGAL PAGES STYLES
   Extends styles.css with text-focused layout
   ============================================ */

.legal-body {
  background: var(--bg);
}

/* Make nav always solid on legal pages */
.nav-legal {
  background: rgba(4, 23, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
}

/* ============================================
   HEADER
   ============================================ */
.legal-header {
  position: relative;
  background: var(--ink-deep);
  color: #fff;
  padding: 160px 0 80px;
  overflow: hidden;
}

.legal-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.legal-header-bg .hero-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(18, 160, 251, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(8, 65, 103, 0.3) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-deep) 0%, #020a13 100%);
}

.legal-header-bg .hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.legal-header-bg .hero-glow-1 {
  width: 500px; height: 500px;
  background: rgba(18, 160, 251, 0.12);
  top: -100px; right: -100px;
}

.legal-header-inner {
  position: relative;
  z-index: 2;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
  transition: color 0.2s var(--ease);
}

.back-link:hover {
  color: var(--azul);
}

.back-link svg {
  transition: transform 0.3s var(--ease);
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.legal-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 16px 0 16px;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.legal-main {
  background: var(--bg);
  padding: 80px 0 120px;
  position: relative;
}

.legal-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}

.legal-section {
  margin-bottom: 56px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.legal-section h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.005em;
  margin: 32px 0 12px;
}

.legal-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 18px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.legal-section li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  padding: 6px 0 6px 28px;
  position: relative;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--azul);
}

.legal-section ol {
  counter-reset: legal-counter;
}

.legal-section ol li {
  counter-increment: legal-counter;
}

.legal-section ol li::before {
  content: counter(legal-counter) ".";
  position: absolute;
  left: 0;
  top: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--azul);
  font-weight: 500;
}

.legal-section a {
  color: var(--ink-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease);
}

.legal-section a:hover {
  color: var(--azul);
}

.legal-section strong {
  font-weight: 600;
  color: var(--ink);
}

/* Info box for company data */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 24px 0;
}

.legal-card dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 24px;
  margin: 0;
}

.legal-card dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 3px;
}

.legal-card dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 500;
}

.legal-card dd a {
  color: var(--ink-mid);
}

/* Cookies table */
.cookies-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cookies-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.cookies-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  line-height: 1.5;
  vertical-align: top;
}

.cookies-table tr:last-child td {
  border-bottom: none;
}

.cookies-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
}

/* TOC navigation */
.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 56px;
}

.legal-toc h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc-counter;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}

.legal-toc li {
  counter-increment: toc-counter;
  padding: 4px 0 4px 24px;
  position: relative;
}

.legal-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--azul);
  font-weight: 500;
}

.legal-toc a {
  font-size: 0.92rem;
  color: var(--text);
  transition: color 0.2s var(--ease);
}

.legal-toc a:hover {
  color: var(--azul);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .legal-header {
    padding: 120px 0 60px;
  }
  .legal-main {
    padding: 56px 0 80px;
  }
  .legal-container {
    padding: 0 20px;
  }
  .legal-card dl {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .legal-card dt {
    padding-top: 12px;
  }
  .legal-card dt:first-child {
    padding-top: 0;
  }
  .legal-toc ol {
    grid-template-columns: 1fr;
  }
  .cookies-table {
    font-size: 0.85rem;
  }
  .cookies-table th,
  .cookies-table td {
    padding: 10px 12px;
  }
}

/* Scroll offset for anchor jumps */
.legal-section {
  scroll-margin-top: 90px;
}
