/* ==========================================================================
   MUTIF LEGAL & PRIVACY STYLES (legal.css)
   Clean, Elegant, Responsive Design System for Mutif Legal Documents
   ========================================================================== */

:root {
  --plum: #8f0177;
  --deep: #420137;
  --rose: #de1a58;
  --gold: #ea489c;
  --mutifgold: #f4c65d;
  --ink: #2e2e2e;
  --cream: #fffaf7;
  --muted: #746d72;
  --line: #eadfe6;
}

/* --- Base & Reset --- */
html {
  scroll-behavior: smooth;
}

body.legal-body {
  background-color: #faf7f9;
  color: var(--ink);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

/* --- Skip Link --- */
.skip-link {
  position: fixed;
  z-index: 9999;
  left: 1rem;
  top: -4rem;
  padding: 0.7rem 1.2rem;
  background: #ffffff;
  color: var(--plum);
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: top 0.2s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* --- Header / Navigation --- */
.legal-navbar {
  background: linear-gradient(100deg, #1d0019 0%, #3a002e 50%, #520040 100%);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 100;
}

.legal-navbar .navbar-brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.legal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-back-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: translateX(-2px);
  border-color: rgba(255, 255, 255, 0.35);
}

/* --- Banner Hero --- */
.legal-hero {
  background: linear-gradient(115deg, #260020 0%, #6e0051 55%, #a80c5d 100%);
  color: #ffffff;
  padding: 4.5rem 0 3.75rem;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(234, 72, 156, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.legal-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--mutifgold);
  margin-bottom: 0.75rem;
}

.legal-hero .eyebrow span {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--mutifgold);
  border-radius: 2px;
}

.legal-hero-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.3rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.legal-hero-title em {
  font-style: italic;
  color: var(--mutifgold);
}

.legal-hero-desc {
  max-width: 760px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #f7e8f3;
  margin-bottom: 2rem;
}

.legal-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  color: #ecd7e6;
}

.legal-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-meta-item i {
  color: var(--mutifgold);
  font-size: 0.95rem;
}

/* --- Main Content & Layout --- */
.legal-main-wrap {
  padding: 2.5rem 0 5rem;
  background: #faf7f9;
}

.legal-breadcrumb {
  margin-bottom: 2rem;
}

.legal-breadcrumb .breadcrumb {
  font-size: 0.82rem;
  margin-bottom: 0;
}

.legal-breadcrumb .breadcrumb a {
  color: var(--plum);
  text-decoration: none;
  font-weight: 500;
}

.legal-breadcrumb .breadcrumb a:hover {
  text-decoration: underline;
}

.legal-breadcrumb .breadcrumb-item.active {
  color: var(--muted);
}

/* --- Sticky TOC Sidebar --- */
.legal-toc-wrapper {
  position: sticky;
  top: 1.75rem;
  z-index: 10;
}

.legal-toc-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 10px 30px rgba(66, 1, 55, 0.04);
}

.legal-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f2e9f0;
}

.legal-toc-title i {
  color: var(--plum);
  font-size: 1.1rem;
}

.legal-toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: calc(100vh - 310px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e5d8e1 transparent;
}

.legal-toc-nav::-webkit-scrollbar {
  width: 4px;
}
.legal-toc-nav::-webkit-scrollbar-thumb {
  background: #e5d8e1;
  border-radius: 4px;
}

.legal-toc-nav li {
  margin-bottom: 0.2rem;
}

.legal-toc-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  color: #554852;
  font-size: 0.79rem;
  line-height: 1.35;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legal-toc-link:hover {
  background: #fdf2f9;
  color: var(--plum);
}

.legal-toc-link.active {
  background: #f7e3f0;
  color: var(--plum);
  font-weight: 600;
}

.legal-toc-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: #9c8394;
  background: #f3edf1;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.legal-toc-link.active .legal-toc-num,
.legal-toc-link:hover .legal-toc-num {
  background: var(--plum);
  color: #ffffff;
}

.legal-toc-cta {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--line);
  text-align: center;
}

.legal-toc-cta p {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* --- Document Card & Content --- */
.legal-document-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 3rem 3.25rem;
  box-shadow: 0 15px 45px rgba(66, 1, 55, 0.04);
}

.legal-section {
  scroll-margin-top: 3.5rem;
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.legal-section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #740056, #b40c64);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(116, 0, 86, 0.25);
}

.legal-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.4rem, 2.3vw, 1.85rem);
  color: var(--deep);
  margin: 0;
  line-height: 1.25;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #5c144a;
  margin: 1.6rem 0 0.6rem;
}

.legal-section p {
  color: #4a4047;
  font-size: 0.92rem;
  line-height: 1.85;
  margin-bottom: 1.1rem;
}

.legal-section ul,
.legal-section ol {
  color: #4a4047;
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  padding-left: 1.4rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section strong {
  color: #2b1826;
}

/* --- Callout Blocks --- */
.legal-callout {
  background: linear-gradient(135deg, #fdf4fb 0%, #faedf7 100%);
  border-left: 4px solid var(--plum);
  border-radius: 0 14px 14px 0;
  padding: 1.35rem 1.6rem;
  margin: 1.6rem 0;
}

.legal-callout h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--plum);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.legal-callout p {
  font-size: 0.88rem;
  color: #5c4e58;
  line-height: 1.75;
  margin: 0;
}

.legal-callout-pending {
  background: #fffdf2;
  border-left: 4px solid var(--mutifgold);
  border: 1px solid #fae8ba;
  border-left-width: 4px;
  border-radius: 12px;
  padding: 1.15rem 1.4rem;
  margin: 1.6rem 0;
  font-size: 0.86rem;
  color: #7a5d07;
  line-height: 1.7;
}

.legal-callout-pending strong {
  color: #684d00;
  display: block;
  margin-bottom: 0.35rem;
}

.legal-divider {
  border: 0;
  border-top: 1px solid #f1e7ee;
  margin: 2.75rem 0;
}

/* --- Cross Card (Bottom CTA) --- */
.legal-cross-card {
  background: linear-gradient(135deg, #fcf4fa 0%, #f7e6f2 100%);
  border: 1px solid #eed7e9;
  border-radius: 18px;
  padding: 2rem 2.25rem;
  margin-top: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.legal-cross-text h4 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--deep);
  margin-bottom: 0.25rem;
}

.legal-cross-text p {
  color: #6a5865;
  font-size: 0.86rem;
  margin: 0;
}

.legal-action-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-legal-primary {
  background: linear-gradient(135deg, #740056, #8f0177);
  color: #ffffff !important;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 6px 18px rgba(116, 0, 86, 0.25);
  transition: all 0.25s ease;
  border: none;
}

.btn-legal-primary:hover {
  background: linear-gradient(135deg, #5c0044, #740056);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(116, 0, 86, 0.35);
  color: #ffffff !important;
}

.btn-legal-outline {
  background: #ffffff;
  color: var(--plum) !important;
  border: 1.5px solid var(--plum);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.25s ease;
}

.btn-legal-outline:hover {
  background: #fdf2f9;
  border-color: #5c0044;
  color: #5c0044 !important;
  transform: translateY(-2px);
}

/* --- Footer --- */
footer {
  background: #260020;
  color: #d8c3d4;
  padding: 2.25rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
}

.footer-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.85rem;
  letter-spacing: -1px;
  color: #ffffff;
  text-decoration: none;
}

.footer-brand span {
  color: var(--gold);
}

.footer-inner p {
  margin: 0;
  font-size: 0.72rem;
  color: #c9b4c5;
}

.footer-inner div {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-inner a {
  color: #e5d2e2;
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer-inner a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Visitor Tracker in Footer */
.mutif-visitor-tracker-wrap {
  margin: 0.35rem 0;
  display: flex !important;
  justify-content: center;
}

.mutif-visitor-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 0.85rem !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.mutif-visitor-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.mutif-visitor-metric {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem !important;
  color: #fff;
}

.mutif-visitor-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(214, 51, 132, 0.25);
  color: #fca5a5;
  font-size: 0.72rem;
}

.mutif-visitor-metric:nth-child(3) .mutif-visitor-icon-wrap {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.mutif-visitor-metric:nth-child(5) .mutif-visitor-icon-wrap {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.mutif-visitor-info {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.72rem;
}

.mutif-visitor-label {
  color: #d1b4cb;
  font-weight: 500;
  font-size: 0.68rem;
  text-transform: capitalize;
}

.mutif-visitor-val {
  font-weight: 700;
  color: #fef08a;
  letter-spacing: 0.02em;
  font-size: 0.75rem;
}

.mutif-visitor-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.mutif-visitor-shimmer {
  opacity: 0.6;
  animation: mutifPulse 1.5s infinite;
}

@keyframes mutifPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

@media (max-width: 576px) {
  .mutif-visitor-pill {
    gap: 0.5rem !important;
    padding: 0.35rem 0.75rem;
  }
  .mutif-visitor-info {
    font-size: 0.65rem;
  }
  .mutif-visitor-label {
    font-size: 0.62rem;
  }
  .mutif-visitor-val {
    font-size: 0.7rem;
  }
}


/* --- Voucher Summary Card inside Terms --- */
.legal-voucher-summary {
  background: linear-gradient(135deg, #fff9e9, #fbf0d8);
  border: 1.5px dashed #dfa93f;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 8px 24px rgba(223, 169, 63, 0.12);
}

.legal-voucher-summary-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: #50103e;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(223, 169, 63, 0.35);
}

.legal-voucher-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
  font-size: 0.88rem;
  color: #4a3424;
}

.legal-voucher-summary-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.legal-voucher-summary-list li i {
  color: #27884d;
  font-size: 1rem;
  flex-shrink: 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
  .legal-document-card {
    padding: 2.25rem 1.75rem;
  }
  .legal-hero {
    padding: 3.5rem 0 2.75rem;
  }
  .legal-toc-wrapper {
    position: static;
    margin-bottom: 2rem;
  }
  .legal-toc-nav {
    max-height: 240px;
  }
}

@media (max-width: 575.98px) {
  .legal-document-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
  .legal-section-header {
    gap: 0.75rem;
  }
  .legal-section-number {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-radius: 8px;
  }
  .legal-cross-card {
    padding: 1.5rem 1.25rem;
  }
  .legal-action-group {
    width: 100%;
    flex-direction: column;
  }
  .legal-action-group a {
    width: 100%;
    justify-content: center;
  }
}
