/* Legal pages (/terms/, /privacy/, /es/terminos/, /es/privacidad/) — layered on app.css. */
.legal-body { min-height: 100vh; }
.legal-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 70% 0%, rgba(40, 60, 130, .35), transparent 60%), radial-gradient(90% 70% at 0% 100%, rgba(90, 60, 140, .25), transparent 60%), var(--sky-950); }
.legal-sky::before { content: ""; position: absolute; inset: -10%; background: url("../assets/sky-glow.jpg") center 40% / cover no-repeat; opacity: .55; transform: rotate(-8deg) scale(1.1); }
.legal-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.legal-body .top { padding-bottom: .9rem; background: rgba(4, 7, 22, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(238, 245, 255, .06); }
.legal-body #progress { z-index: 30; }

.legal { position: relative; z-index: 2; padding: clamp(7rem, 14vh, 9rem) var(--pad) 2rem; }
.legal__wrap { max-width: 72rem; margin: 0 auto; }
.legal .policy-page__intro { max-width: 46rem; margin: 0 0 clamp(2.5rem, 6vh, 4rem); animation: legalIn 1s var(--ease) both; }
.legal .policy-page__intro .eyebrow { margin: 0 0 1.1rem; font: 600 .74rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--warm); }
.legal .policy-page__intro .eyebrow::before { content: "✦"; color: var(--gold); margin-right: .6rem; letter-spacing: 0; }
.legal .policy-page__intro h1 { margin: 0 0 1.2rem; font: 400 clamp(2.6rem, 6.4vw, 5rem)/.98 var(--display); letter-spacing: -.035em; color: #fff; text-wrap: balance; }
.legal .policy-page__intro p:last-child { margin: 0; font-size: .85rem; color: var(--mist-300); }
.legal code { font: 500 .78em/1 ui-monospace, "SF Mono", Menlo, monospace; padding: .25em .5em; border-radius: 6px; background: rgba(226, 200, 150, .1); border: 1px solid rgba(226, 200, 150, .22); color: var(--warm); }

.legal__layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.legal__toc { position: sticky; top: 6.5rem; animation: legalIn 1s .15s var(--ease) both; }
.legal__toc p { margin: 0 0 .8rem; font: 600 .66rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--mist-300); }
.legal__toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(238, 245, 255, .1); }
.legal__toc a { display: flex; gap: .7rem; padding: .45rem 0 .45rem 1rem; margin-left: -1px; border-left: 1px solid transparent; font-size: .84rem; line-height: 1.35; color: rgba(214, 224, 248, .66); text-decoration: none; transition: color .25s, border-color .25s; }
.legal__toc a span { font-variant-numeric: tabular-nums; color: rgba(226, 200, 150, .6); }
.legal__toc a:hover { color: #fff; }
.legal__toc a.is-active { color: var(--warm); border-left-color: var(--gold); }

.legal .policy-page__sections { display: grid; gap: 1.1rem; counter-reset: sec; }
.legal .policy-page__sections section { position: relative; padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.3rem, 3vw, 2.4rem); border-radius: 24px; counter-increment: sec; scroll-margin-top: 6.5rem;
  background: linear-gradient(180deg, rgba(12, 18, 46, .72), rgba(6, 10, 28, .7)); border: 1px solid rgba(238, 245, 255, .1);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease), border-color .4s; }
.legal .policy-page__sections section.is-in { opacity: 1; transform: none; }
.legal .policy-page__sections section:hover { border-color: rgba(226, 200, 150, .28); }
.legal .policy-page__sections h2 { display: flex; align-items: baseline; gap: .9rem; margin: 0 0 .9rem; font: 400 clamp(1.45rem, 2.4vw, 1.9rem)/1.15 var(--display); letter-spacing: -.015em; color: #fff; }
.legal .policy-page__sections h2::before { content: counter(sec, decimal-leading-zero); font: 600 .72rem/1 var(--sans); letter-spacing: .12em; color: var(--gold); transform: translateY(-.35em); }
.legal .policy-page__sections p { margin: 0 0 .9rem; color: rgba(222, 230, 250, .86); font-size: 1rem; line-height: 1.75; }
.legal .policy-page__sections p:last-child { margin-bottom: 0; }
.legal .policy-page__sections ul, .legal .policy-page__sections ol { margin: 0 0 .9rem; padding-left: 1.2rem; color: rgba(222, 230, 250, .86); }
.legal .policy-page__sections li { margin: .3rem 0; }
.legal .policy-page__sections li::marker { color: var(--gold); }
.legal a[href^="mailto:"], .legal .policy-page__sections a { color: var(--warm); text-decoration: underline; text-decoration-color: rgba(226, 200, 150, .4); text-underline-offset: .2em; }

.legal-cta { position: relative; z-index: 2; max-width: 72rem; margin: clamp(3rem, 8vh, 5rem) auto 0; padding: 0 var(--pad); }
.legal-cta__card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2.4rem); border-radius: 28px;
  background: radial-gradient(90% 120% at 100% 0%, rgba(226, 200, 150, .16), transparent 60%), linear-gradient(180deg, rgba(14, 20, 50, .82), rgba(6, 10, 28, .8)); border: 1px solid rgba(226, 200, 150, .3); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.legal-cta__card h2 { margin: 0 0 .3rem; font: 400 clamp(1.4rem, 2.6vw, 1.9rem)/1.1 var(--display); color: #fff; }
.legal-cta__card p { margin: 0; color: var(--mist-300); font-size: .92rem; }
.legal-cta__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.legal-cta__actions .btn { margin: 0; }
.legal-body .site-foot { padding-top: 3rem; }
.legal-body .site-foot p { margin: .3rem 0; }

@keyframes legalIn { from { opacity: 0; transform: translateY(16px); } }
@media (max-width: 900px) {
  .legal__layout { grid-template-columns: 1fr; }
  .legal__toc { position: static; }
  .legal__toc ol { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; }
  .legal__toc a { padding: .45rem .7rem; margin: 0; border: 1px solid rgba(238, 245, 255, .12); border-radius: 999px; font-size: .76rem; }
  .legal__toc a span { display: none; }
}
@media (max-width: 560px) {
  .legal-body .top__actions .pill--hide-sm { display: none; }
  .legal__toc { display: none; }

  .legal-cta__actions { width: 100%; } .legal-cta__actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .legal .policy-page__sections section { opacity: 1; transform: none; transition: none; }
  .legal .policy-page__intro, .legal__toc { animation: none; }
}
@media print {
  .legal-sky, .top, .legal__toc, .legal-cta, .site-foot, #progress { display: none !important; }
  .legal { padding: 0; } .legal .policy-page__sections section { opacity: 1; transform: none; background: none; border: 0; box-shadow: none; color: #000; }
}
