/* =====================================================================
   SweetCherryAI — páginas de documentos (/legal/*) e /sobre
   ===================================================================== */

/* ---------- Documentos ---------- */
.lm-doc {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
}

.lm-doc__nav {
  position: sticky;
  top: 5.2rem;
  padding: 1.1rem;
  border: 1px solid var(--j-line);
  border-radius: 24px;
  background:
    radial-gradient(12rem 8rem at 0% 0%, rgba(89, 108, 255, 0.16), transparent 70%),
    var(--j-glass);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.35);
}

.lm-doc__nav-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  padding: 0 0.3rem;
  font-family: var(--j-display);
  font-size: 1.05rem;
  color: var(--j-peach);
}

.lm-doc__nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lm-doc__nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--j-muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.lm-doc__nav-link:hover {
  color: var(--j-cream);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.lm-doc__nav-link.is-active {
  color: #fff;
  border-color: rgba(89, 108, 255, 0.4);
  background: linear-gradient(120deg, rgba(89, 108, 255, 0.22), rgba(45, 117, 255, 0.18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lm-doc__nav-fruit {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lm-doc__nav-link:hover .lm-doc__nav-fruit,
.lm-doc__nav-link.is-active .lm-doc__nav-fruit {
  transform: rotate(-12deg) scale(1.12);
}

.lm-doc__nav-link.is-active .lm-doc__nav-fruit {
  background: var(--j-juice);
}

.lm-doc__card {
  position: relative;
  min-width: 0;
  padding: 2.4rem 2.6rem 2.6rem;
  border: 1px solid var(--j-line);
  border-radius: 28px;
  background:
    radial-gradient(28rem 16rem at 100% 0%, rgba(45, 117, 255, 0.16), transparent 70%),
    var(--j-glass);
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.lm-doc__deco {
  position: absolute;
  top: 0;
  right: 0;
  width: 13rem;
  height: 9rem;
  pointer-events: none;
}

.lm-doc__deco-blob {
  position: absolute;
  top: -2.5rem;
  right: -2rem;
  width: 11rem;
  height: 9rem;
  border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%;
  background: radial-gradient(circle at 40% 40%, rgba(122, 134, 255, 0.55), rgba(45, 117, 255, 0.25) 60%, transparent 75%);
  filter: blur(4px);
  animation: lm-blob 9s ease-in-out infinite;
}

.lm-doc__deco-fruit {
  position: absolute;
  line-height: 1;
  filter: drop-shadow(0 0.5rem 0.8rem rgba(0, 16, 40, 0.55));
  animation: lm-bob 4.8s ease-in-out infinite;
}

.lm-doc__deco-fruit--1 { top: 1.4rem; right: 2.2rem; font-size: 2.6rem; rotate: -12deg; }
.lm-doc__deco-fruit--2 { top: 4.6rem; right: 5.6rem; font-size: 1.5rem; rotate: 14deg; animation-delay: -1.6s; }
.lm-doc__deco-fruit--3 { top: 0.8rem; right: 6.6rem; font-size: 1.3rem; rotate: -20deg; animation-delay: -3s; }

.lm-doc__content {
  position: relative;
  color: var(--j-muted);
}

.lm-doc__content h1 {
  max-width: calc(100% - 9rem);
  margin: 0 0 1.4rem;
  font-family: var(--j-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.08;
  background: linear-gradient(100deg, #eeefff 10%, #8f95ff 55%, #5a90ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lm-doc__content h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 2rem 0 0.75rem;
  font-family: var(--j-display);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--j-cream);
}

.lm-doc__content h2::before {
  content: "";
  flex: 0 0 auto;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--j-juice);
  box-shadow: 0 0 0.7rem rgba(60, 127, 255, 0.7);
}

.lm-doc__content h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1rem;
  color: var(--j-peach);
}

.lm-doc__content p strong:only-child {
  display: block;
  margin: 1.25rem 0 0.5rem;
  color: var(--j-peach);
  font-size: 1.02rem;
}

.lm-doc__content p,
.lm-doc__content li {
  font-size: 0.95rem;
  line-height: 1.72;
}

.lm-doc__content p {
  margin: 0 0 0.9rem;
}

.lm-doc__content ul,
.lm-doc__content ol {
  margin: 0 0 1.1rem;
  padding: 0.9rem 1.1rem 0.9rem 2.2rem;
  border: 1px solid var(--j-line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  list-style: disc;
}

.lm-doc__content ol {
  list-style: decimal;
}

.lm-doc__content li {
  display: list-item;
}

.lm-doc__content li + li {
  margin-top: 0.4rem;
}

.lm-doc__content li::marker {
  color: var(--j-cherry);
}

.lm-doc__content a {
  color: var(--j-peach);
  text-decoration: underline;
  text-decoration-color: rgba(143, 149, 255, 0.4);
  text-underline-offset: 3px;
  word-break: break-word;
}

.lm-doc__content a:hover {
  text-decoration-color: currentColor;
}

.lm-doc__content strong {
  color: var(--j-cream);
}

/* ---------- Sobre ---------- */
.lm-about-tools {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-about-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.3rem 0.8rem 1.15rem;
  border: 1px solid var(--j-line);
  border-radius: 22px;
  background: var(--j-glass);
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}

.lm-about-tool::before {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 80%;
  background: radial-gradient(circle, rgba(45, 117, 255, 0.22), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lm-about-tool:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 108, 255, 0.4);
}

.lm-about-tool:hover::before {
  opacity: 1;
}

.lm-about-tool__fruit {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 40%),
    var(--j-juice);
  box-shadow: 0 0.6rem 1.4rem rgba(45, 117, 255, 0.35);
  font-size: 1.7rem;
  animation: lm-bob 4.8s ease-in-out infinite;
}

.lm-about-tool:nth-child(2n) .lm-about-tool__fruit { animation-delay: -1.2s; }
.lm-about-tool:nth-child(3n) .lm-about-tool__fruit { animation-delay: -2.4s; }

.lm-about-tool strong {
  position: relative;
  font-family: var(--j-display);
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--j-cream);
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .lm-doc {
    grid-template-columns: minmax(0, 1fr);
  }

  .lm-doc__nav {
    position: static;
    padding: 0.8rem;
  }

  .lm-doc__nav-title {
    display: none;
  }

  .lm-doc__nav-list {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lm-doc__nav-list::-webkit-scrollbar {
    display: none;
  }

  .lm-doc__nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .lm-doc__nav-link:hover {
    transform: none;
  }

  .lm-about-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .lm-doc__card {
    padding: 1.6rem 1.2rem 1.8rem;
    border-radius: 22px;
  }

  .lm-doc__deco {
    transform: scale(0.7);
    transform-origin: top right;
  }

  .lm-doc__content h1 {
    max-width: calc(100% - 5rem);
  }

  .lm-about-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .lm-doc__deco-blob,
  .lm-doc__deco-fruit,
  .lm-about-tool__fruit {
    animation: none;
  }
}
