/* ===========================================================
   ARTEX MEDIA — Legal pages (aviso legal, privacidad, T&C)
   Reuses tokens from styles.css / components.css
   =========================================================== */

/* ---------- Hero ---------- */
.legal-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(150px, 20vh, 230px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(120% 85% at 50% -10%, var(--accent-soft), transparent 58%),
    var(--bg);
}
.legal-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.legal-hero .eyebrow { justify-content: center; margin-bottom: 1.6rem; }
.legal-hero h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.6rem);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin: 0 auto;
}
.legal-hero__meta {
  margin-top: 1.5rem;
  color: var(--muted-2);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Layout ---------- */
.legal { padding: clamp(44px, 6vw, 86px) 0 clamp(70px, 9vw, 120px); }
.legal__layout {
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 900px) {
  .legal__layout { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Table of contents ---------- */
.legal__toc { position: sticky; top: 108px; }
@media (max-width: 900px) {
  .legal__toc {
    position: static;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px 16px;
    margin-bottom: 28px;
  }
}
.legal__toc-label {
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1.1rem;
  padding-left: 0.9em;
}
.legal__toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.legal__toc a {
  display: block;
  padding: 0.55em 0.9em;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.legal__toc a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.legal__toc a.is-active {
  color: var(--text);
  border-left-color: var(--accent);
  background: rgba(255,255,255,0.04);
}

/* ---------- Prose body ---------- */
.legal__body { max-width: 74ch; }
.legal__intro {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.16rem);
  line-height: 1.7;
  padding-bottom: 1.8rem;
  margin-bottom: 2.6rem;
  border-bottom: 1px solid var(--line);
}
.legal__intro strong { color: var(--text); font-weight: 500; }

.legal__section {
  padding-top: 0.4rem;
  margin-bottom: 3rem;
  scroll-margin-top: 108px;
}
.legal__section:last-of-type { margin-bottom: 0; }
.legal__section h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  letter-spacing: -0.02em;
  display: flex;
  gap: 0.6em;
  align-items: baseline;
}
.legal__section h2 .num {
  color: var(--accent);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.legal__section h3 {
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1.7rem;
  letter-spacing: -0.01em;
}
.legal__section p {
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.72;
}
.legal__section ul {
  margin: 1.1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.legal__section li { padding-left: 0.35rem; line-height: 1.65; }
.legal__section li::marker { color: var(--accent); }
.legal__section a { color: var(--accent-bright); }
.legal__section a:hover { text-decoration: underline; }
.legal__section strong { color: var(--text); font-weight: 500; }

/* contact / closing card */
.legal__card {
  margin-top: 2.6rem;
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%),
    var(--surface);
}
.legal__card h3 { margin-top: 0; font-size: 1.1rem; }
.legal__card p { margin-top: 0.7rem; }
.legal__card a { color: var(--accent-bright); }
