/* MY-OOH legal
   Color: paper / ink / red brand
   Tipo: DM Sans, display por peso
   Layout: hero legal + índice lateral + lectura
   Firma: barra roja de documento y sección activa */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0a0a0a;
  --ink-2: #3a3a3a;
  --ink-3: #737373;
  --paper: #ffffff;
  --paper-2: #f7f7f5;
  --paper-3: #f0f0ec;
  --border: #e8e8e4;
  --brand: #e53e3e;
  --brand-dark: #c53030;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.container { width: min(100% - 48px, 1120px); margin-inline: auto; }

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .92);
  padding-top: env(safe-area-inset-top, 0);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 48px, 1120px);
  min-height: 64px;
  margin-inline: auto;
  gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.nav-logo img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  transition: background .18s, color .18s;
}
.nav-link:hover, .nav-link.active { background: var(--paper-2); color: var(--ink); }
.nav-cta {
  border-radius: 50px;
  background: var(--ink);
  padding: 9px 18px;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ink-2); }
.nav-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}
.nav-mobile { display: none; }

/* Document hero */
.legal-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--paper-2);
  padding: 88px 0 78px;
}
.legal-hero::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--brand);
  content: "";
}
.legal-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.legal-kicker::before { width: 24px; height: 2px; background: currentColor; content: ""; }
.legal-hero h1 {
  max-width: 780px;
  font-size: clamp(40px, 6vw, 70px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}
.legal-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}
.legal-updated { color: var(--ink-3); font-size: 14px; }
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}
.legal-back:hover { color: var(--brand); }

/* Reading layout */
.legal-section { padding: 72px 0 104px; }
.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  justify-content: space-between;
  gap: 80px;
}
.legal-index { min-width: 0; }
.legal-index-card {
  position: sticky;
  top: calc(64px + 28px);
  max-height: calc(100vh - 120px);
  overflow: auto;
  scrollbar-width: thin;
}
.legal-index-label {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.legal-toc { display: flex; flex-direction: column; gap: 2px; }
.legal-toc a {
  position: relative;
  display: block;
  border-radius: 8px;
  padding: 8px 10px 8px 14px;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.35;
  transition: background .18s, color .18s;
}
.legal-toc a::before {
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  content: "";
}
.legal-toc a:hover { background: var(--paper-2); color: var(--ink); }
.legal-toc a.active { background: #fff1f1; color: var(--brand-dark); font-weight: 700; }
.legal-toc a.active::before { background: var(--brand); }

.legal-content { min-width: 0; }
.legal-lead {
  margin-bottom: 50px;
  border-left: 4px solid var(--brand);
  padding: 4px 0 4px 20px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
}
.legal-content h2 {
  scroll-margin-top: 100px;
  margin: 56px 0 16px;
  color: var(--ink);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content h3 {
  margin: 26px 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}
.legal-content p {
  margin-bottom: 14px;
  color: var(--ink-2);
  font-size: 16px;
}
.legal-content ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 22px;
  padding-left: 0;
  list-style: none;
}
.legal-content li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-2);
  font-size: 15px;
}
.legal-content li::before {
  position: absolute;
  top: .7em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}
.highlight { color: var(--ink); font-weight: 700; }
.contact-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 22px 0 32px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--border);
}
.contact-box p {
  min-width: 0;
  margin: 0;
  background: var(--paper-2);
  padding: 16px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  background: var(--ink);
  padding: 80px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  color: var(--paper);
}
.footer-wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand-logo { display: flex; align-items: center; gap: 10px; }
.footer-brand-logo img { width: 38px; height: 38px; }
.footer-logo-name { color: var(--paper); font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.footer-brand p {
  max-width: 260px;
  margin-top: 14px;
  color: rgba(255,255,255,.4);
  font-size: 13px;
  line-height: 1.65;
}
.footer-col h4 {
  margin-bottom: 16px;
  color: rgba(255,255,255,.35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  margin-bottom: 10px;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  transition: color .18s;
}
.footer-col a:hover { color: var(--paper); }
.footer-bottom { padding-top: 28px; color: rgba(255,255,255,.3); font-size: 13px; }

@media (max-width: 1024px) {
  .legal-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .container, .nav-inner, .footer-wrap { width: min(100% - 32px, 1120px); }
  .nav-links, .nav-cta { display: none; }
  .nav-menu-btn { display: flex; }
  .nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border-bottom: 1px solid var(--border);
    background: var(--paper);
    padding: 10px 16px 18px;
  }
  .nav-mobile.open { display: grid; }
  .nav-mobile a {
    border-radius: 8px;
    padding: 12px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
  }
  .nav-mobile a:hover { background: var(--paper-2); color: var(--ink); }
  .legal-hero { padding: 60px 0 52px; }
  .legal-hero::after { width: 5px; }
  .legal-hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .legal-section { padding: 30px 0 72px; }
  .legal-layout { display: block; }
  .legal-index {
    position: sticky;
    top: 64px;
    z-index: 40;
    margin: 0 -16px 44px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.96);
    padding: 10px 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .legal-index-card { position: static; max-height: none; overflow: visible; }
  .legal-index-label { display: none; }
  .legal-toc { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .legal-toc::-webkit-scrollbar { display: none; }
  .legal-toc a {
    flex: 0 0 auto;
    max-width: 220px;
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 8px 13px;
    background: var(--paper);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .legal-toc a::before { display: none; }
  .legal-toc a.active { border-color: #f4b5b5; }
  .legal-lead { margin-bottom: 40px; font-size: 16px; }
  .legal-content h2 { margin-top: 46px; scroll-margin-top: 130px; }
  .legal-content p { font-size: 15px; }
  .contact-box { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
