/* ===== DVMReady Legal / Policy Pages — Enhanced Design ===== */

/* --- Hero --- */
.legal-hero {
  position: relative;
  padding: 72px 16px 40px;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(15,118,110,0.12) 0%, rgba(15,118,110,0) 34%),
    linear-gradient(240deg, rgba(201,142,69,0.16) 0%, rgba(201,142,69,0) 34%),
    linear-gradient(180deg, rgba(255,253,249,0.74) 0%, rgba(246,241,232,0.78) 100%);
  border-bottom: 1px solid rgba(20,33,47,0.08);
}
.legal-hero__blob {
  display: none;
}
.legal-hero__blob--tl {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(216,161,95,0.5), transparent 70%);
  top: -80px;
  left: -60px;
}
.legal-hero__blob--br {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(15,118,110,0.35), transparent 70%);
  bottom: -60px;
  right: -40px;
}
.legal-hero__copy {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  margin: 0 auto;
}
.legal-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(15,118,110,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  padding: 7px 13px;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.legal-hero .eyebrow svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}
.legal-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: #17363b;
  margin: 0 0 18px;
}
.legal-hero .lede {
  color: var(--text-soft);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 12px;
  line-height: 1.6;
}
.legal-hero .last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(15,118,110,0.14);
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 8px;
}
.legal-hero .last-updated svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* --- Layout --- */
.legal-layout {
  display: grid;
  gap: 32px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px 80px;
  align-items: start;
}
@media (min-width: 960px) {
  .legal-layout {
    grid-template-columns: 260px 1fr;
    gap: 40px;
  }
}

/* --- Sticky TOC --- */
.legal-toc {
  position: sticky;
  top: 100px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,252,247,0.98)),
    linear-gradient(135deg, rgba(15,118,110,0.08), rgba(201,142,69,0.08));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15,118,110,0.14);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.legal-toc::before {
  content: "";
  display: block;
  height: 4px;
  margin: -20px -20px 16px;
  background: linear-gradient(90deg, var(--brand), var(--accent), #2563eb);
}
.legal-toc__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-toc__title svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}
.legal-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-toc__list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}
.legal-toc__list a:hover,
.legal-toc__list a:focus-visible {
  background: rgba(15,118,110,0.06);
  color: var(--brand);
}
.legal-toc__list a.is-active {
  background: rgba(15,118,110,0.1);
  color: var(--brand);
}
.legal-toc__list a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}
@media (max-width: 959px) {
  .legal-toc {
    position: static;
    order: -1;
  }
}

/* --- Summary Card --- */
.legal-summary {
  background:
    linear-gradient(135deg, rgba(15,118,110,0.10) 0%, rgba(201,142,69,0.12) 50%, rgba(37,99,235,0.06) 100%),
    rgba(255,253,249,0.86);
  border: 1px solid rgba(15,118,110,0.16);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.legal-summary__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
}
.legal-summary__title svg {
  width: 22px;
  height: 22px;
  color: var(--brand);
}
.legal-summary p {
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0;
  font-size: 0.98rem;
}

/* --- Content Cards --- */
.legal-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fffcf7 100%);
  border-radius: var(--radius-md);
  border: 1px solid rgba(15,118,110,0.12);
  box-shadow: 0 2px 12px rgba(20,33,47,0.05);
  padding: 32px;
  margin-bottom: 20px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  opacity: 0;
  transform: translateY(24px);
}
.legal-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.legal-card:nth-of-type(3n + 2)::before {
  background: linear-gradient(90deg, #2563eb, var(--brand));
}
.legal-card:nth-of-type(3n + 3)::before {
  background: linear-gradient(90deg, var(--accent), #2563eb);
}
.legal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.legal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}
.legal-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.legal-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15,118,110,0.12), rgba(15,118,110,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.legal-card__icon svg {
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.legal-card__heading {
  flex: 1;
}
.legal-card__heading h2 {
  font-size: 1.35rem;
  color: #17363b;
  margin: 0 0 4px;
  line-height: 1.25;
}
.legal-card__heading .section-kicker {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}
.legal-card p,
.legal-card li {
  color: var(--text-soft);
  line-height: 1.7;
  font-size: 1rem;
}
.legal-card ul {
  padding-left: 20px;
  margin: 12px 0 0;
}
.legal-card li {
  margin-bottom: 8px;
}
.legal-card li::marker {
  color: var(--brand);
}
.legal-card a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.legal-card a:hover {
  text-decoration: underline;
}
.legal-card--accent {
  border-left: 4px solid var(--brand);
}

/* --- Process Steps (Editorial Policy) --- */
.legal-steps {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 640px) {
  .legal-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.legal-step {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,252,247,0.96)),
    var(--bg-soft);
  border: 1px solid rgba(15,118,110,0.10);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}
.legal-step__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.legal-step__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.legal-step__desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}

/* --- Trust Badges (Privacy) --- */
.legal-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.legal-trust__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15,118,110,0.14);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
}
.legal-trust__badge:nth-child(3n + 2) {
  border-color: rgba(201,142,69,0.24);
}
.legal-trust__badge:nth-child(3n + 3) {
  border-color: rgba(37,99,235,0.18);
}

.faq-item {
  position: relative;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  padding: 16px 18px 16px 22px;
}
.faq-item::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}
.faq-item:nth-child(3n + 2)::before {
  background: var(--accent);
}
.faq-item:nth-child(3n + 3)::before {
  background: #2563eb;
}
.legal-trust__badge svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* --- Mobile --- */
@media (max-width: 640px) {
  .legal-hero { padding: 52px 16px 32px; }
  .legal-card { padding: 24px; border-radius: 14px; }
  .legal-card__header { gap: 10px; }
  .legal-card__icon { width: 34px; height: 34px; border-radius: 10px; }
  .legal-card__icon svg { width: 16px; height: 16px; }
  .legal-card__heading h2 { font-size: 1.15rem; }
  .legal-toc { padding: 16px; border-radius: 14px; }
  .legal-summary { padding: 20px; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .legal-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
