/* ═══════════════════════════════════════════════════════════
   BROWORKSHOP · Políticas y términos
   ═══════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Barra de lectura con los colores de Colombia */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 4px; pointer-events: none; }
.read-progress span {
  display: block; width: 100%; height: 100%; transform: scaleX(var(--p, 0)); transform-origin: left;
  background: linear-gradient(90deg, var(--col-yellow) 0 50%, var(--col-blue) 50% 75%, var(--col-red) 75%);
}

/* ───────────── Encabezado ───────────── */
.legal-hero {
  position: relative; overflow: hidden; padding: 26px 0 48px;
  background:
    radial-gradient(820px 360px at 100% 0%, var(--lav), transparent 60%),
    radial-gradient(720px 320px at 0% 100%, var(--mint), transparent 60%),
    var(--bg);
}
.legal-hero__blob { position: absolute; border-radius: 50%; filter: blur(46px); pointer-events: none; animation: legal-drift 14s ease-in-out infinite alternate; }
.legal-hero__blob.b1 { right: 10%; top: 12%; width: 220px; aspect-ratio: 1; background: rgba(252, 209, 22, .25); }
.legal-hero__blob.b2 { left: 30%; bottom: -60px; width: 260px; aspect-ratio: 1; background: rgba(92, 130, 255, .18); animation-duration: 18s; }
.legal-hero__text { position: relative; max-width: 780px; margin-top: 22px; animation: rv-up .7s var(--ease) both; }
.legal-hero .h1 { margin-top: 16px; font-size: clamp(2.2rem, 5vw, 3.7rem); }
.legal-updated { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: .88rem; }
.legal-updated .i { width: 16px; height: 16px; color: var(--blue); }
.legal-updated b { color: var(--navy); }

.legal-cards { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.legal-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  min-height: 168px; padding: 20px 20px 44px; border-radius: 26px; background: var(--tone);
  color: var(--navy); text-decoration: none;
  animation: rv-up .7s var(--ease) calc(.15s + var(--i) * 80ms) both;
  transition: transform .5s var(--spring), box-shadow .3s;
}
.legal-card::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 120px; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: transform .6s var(--ease); }
.legal-card:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.legal-card:hover::after { transform: scale(1.35); }
.legal-card__icon { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border-radius: 15px; background: #fff; color: var(--tone-ink); box-shadow: var(--shadow-sm); transition: transform .5s var(--spring); }
.legal-card:hover .legal-card__icon { transform: rotate(-10deg) scale(1.1); }
.legal-card b { position: relative; z-index: 1; font-size: 1.02rem; line-height: 1.25; }
.legal-card small { position: relative; z-index: 1; color: var(--ink); font-weight: 600; }
.legal-card .arrow { position: absolute; right: 18px; bottom: 16px; z-index: 1; color: var(--tone-ink); transition: transform .35s var(--spring); }
.legal-card:hover .arrow { transform: translateX(5px); }

/* ───────────── Distribución ───────────── */
.legal { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; gap: 44px; padding-block: 40px 56px; }
.legal__toc {
  position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px;
  max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding: 18px;
  border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}
.toc-box summary { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: .92rem; font-weight: 800; list-style: none; cursor: pointer; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary .i { width: 18px; height: 18px; color: var(--blue); }
.toc { display: grid; gap: 1px; margin-top: 10px; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--muted); font-size: .84rem; line-height: 1.35; text-decoration: none; transition: background-color .2s, color .2s, transform .3s var(--spring); }
.toc a:hover { background: var(--bg); color: var(--blue); transform: translateX(3px); }
.toc a.toc__doc { margin-top: 10px; color: var(--navy); font-weight: 800; }
.toc a.toc__doc:first-child { margin-top: 0; }
.toc a.toc__sub { padding-left: 20px; }
.toc a.is-current { background: var(--blue-100); color: var(--blue-600); font-weight: 700; }

/* ───────────── Documentos ───────────── */
.doc { padding: clamp(22px, 4vw, 48px); border: 1px solid var(--line); border-radius: 32px; background: #fff; box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc + .doc { margin-top: 28px; }
.doc--pqrs { background: linear-gradient(160deg, #fff, var(--bg)); }
.doc__head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc__icon { display: grid; flex: none; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: var(--tone); color: var(--tone-ink); }
.doc__icon .i { width: 30px; height: 30px; }
.doc__kicker { color: var(--muted); font: 800 .72rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase; }
.doc__head h2 { margin-top: 8px; font-size: clamp(1.45rem, 2.8vw, 2.1rem); }
.doc h3 { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 12px; font-size: 1.2rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.doc h3 .num { color: var(--blue); font-variant-numeric: tabular-nums; }
.doc p, .doc li, .doc dd { color: var(--ink); line-height: 1.75; }
.doc p + p { margin-top: .8em; }
.doc ul, .doc ol { display: grid; gap: 6px; margin: 10px 0; padding-left: 1.3em; }
.doc ul li::marker { color: var(--blue); }
.doc ol.alpha { list-style: lower-alpha; }
.doc ol.alpha li::marker { color: var(--blue); font-weight: 800; }
.doc a { font-weight: 600; }
.law { color: var(--muted); font-size: .86em; }

.summary { padding: 20px 22px; border: 1px solid #f3e1a2; border-radius: 22px; background: linear-gradient(135deg, var(--butter), #fffdf5 75%); }
.summary__title { display: flex; align-items: center; gap: 8px; color: var(--navy); }
.summary__title .i { color: var(--butter-ink); }
.doc .summary ul { gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.summary li { display: flex; gap: 10px; }
.summary li .i { width: 18px; height: 18px; margin-top: 5px; color: var(--ok); }

.data-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 14px 0; }
.data-card > div { padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.data-card dt { color: var(--muted); font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.data-card dd { margin: 4px 0 0; color: var(--navy); font-weight: 700; line-height: 1.4; word-break: break-word; }

.defs { display: grid; gap: 0; margin: 12px 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.defs > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.defs > div:first-child { border-top: 0; }
.defs > div:nth-child(odd) { background: var(--bg); }
.defs dt { color: var(--navy); font-weight: 800; }
.defs dd { margin: 0; }

.chips-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pill-soft { padding: 8px 14px; border-radius: 999px; background: var(--blue-100); color: var(--blue-600); font-size: .86rem; font-weight: 700; transition: transform .35s var(--spring); }
.pill-soft:hover { transform: translateY(-2px) rotate(-1deg); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.mini-card { padding: 16px 18px; border-radius: 20px; background: var(--bg); transition: transform .45s var(--spring), box-shadow .3s; }
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mini-card > .i { width: 26px; height: 26px; color: var(--blue); }
.mini-card b { display: block; margin: 8px 0 4px; color: var(--navy); }
.doc .mini-card p { color: var(--muted); font-size: .9rem; line-height: 1.6; }

.deadline { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.deadline > div { padding: 18px 20px; border-radius: 22px; background: var(--tone); }
.deadline strong { display: block; color: var(--tone-ink); font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.03em; line-height: 1.05; }
.deadline > div > span { display: block; margin-top: 4px; color: var(--navy); font-weight: 700; }
.doc .deadline p { margin-top: 8px; color: var(--ink); font-size: .88rem; line-height: 1.55; }

.doc ol.timeline { gap: 0; margin: 16px 0; padding: 0; list-style: none; counter-reset: step; }
.timeline li { position: relative; padding: 0 0 18px 54px; counter-increment: step; }
.timeline li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; box-shadow: 0 6px 14px -6px rgba(47, 91, 234, .7); }
.timeline li::after { content: ''; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; color: var(--navy); }

.callout { display: flex; align-items: flex-start; gap: 14px; margin: 16px 0; padding: 16px 18px; border-radius: 20px; background: var(--blue-100); }
.callout > .i { margin-top: 4px; color: var(--blue); }
.doc .callout p { line-height: 1.65; }

.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.channel { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1.5px solid var(--line); border-radius: 20px; background: #fff; color: var(--navy); text-decoration: none; transition: border-color .2s, transform .45s var(--spring), box-shadow .3s; }
.channel:hover { border-color: var(--blue-400); transform: translateY(-3px); box-shadow: var(--shadow); }
.channel__icon { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tone); color: var(--tone-ink); transition: transform .45s var(--spring); }
.channel:hover .channel__icon { transform: rotate(-10deg) scale(1.08); }
.channel b { display: block; }
.channel span { color: var(--muted); font-size: .86rem; font-weight: 600; word-break: break-word; }
.doc a.channel { font-weight: 400; }

.sic { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 18px; padding: 20px 22px; border-radius: 24px; background: var(--navy); }
.doc .sic p { flex: 1; min-width: 240px; color: #d9e1f5; }
.sic b { color: #fff; }
.doc .sic a { color: var(--col-yellow); }
.sic__icon { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: var(--col-yellow); }

/* ───────────── Celular ───────────── */
@media (max-width: 1000px) {
  .legal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal { grid-template-columns: 1fr; gap: 18px; padding-top: 24px; }
  .legal__toc { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .legal-card { min-height: 150px; padding: 16px 16px 40px; border-radius: 22px; }
  .legal-card b { font-size: .92rem; }
  .doc { border-radius: 26px; }
  .doc__head { align-items: flex-start; }
  .doc__icon { width: 50px; height: 50px; border-radius: 16px; }
  .defs > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ───────────── Impresión / PDF ───────────── */
@media print {
  .announce, .tricolor, .site-header, .site-footer, .tabbar, .floaters, .cookie, .toasts, .drawer,
  .skip-link, .read-progress, .legal__toc, .legal-cards, .legal-hero__blob, .crumbs { display: none !important; }
  body { padding: 0 !important; background: #fff; }
  .legal-hero { padding: 0 0 12px; background: none; }
  .legal { display: block; padding: 0; }
  .doc { padding: 0; border: 0; box-shadow: none; }
  .doc + .doc { margin-top: 0; page-break-before: always; }
  .mini-card, .deadline > div, .summary, .callout, .data-card > div { break-inside: avoid; }
  .doc a { color: inherit; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@keyframes legal-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.2); } }
