/* ============================================================
   ViSenAI — Shared Legal Pages Stylesheet
   Terms & Conditions | Privacy Policy | Data Deletion Policy
   ============================================================ */

/* ── Hero shell (compact, dark gradient) ─────────────────── */
.legal-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 30%, rgba(110, 68, 255, 0.25), transparent 18%),
    radial-gradient(circle at 20% 70%, rgba(69, 220, 255, 0.1), transparent 20%),
    linear-gradient(180deg, #040817 0%, #071129 60%, #050b1f 100%);
  color: var(--text-inverse);
  padding-bottom: 52px;
}

.legal-noise {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(96, 117, 255, 0.07), transparent 38%),
    radial-gradient(circle at 18% 100%, rgba(91, 218, 255, 0.08), transparent 28%);
  pointer-events: none;
}

/* ── Legal hero body ──────────────────────────────────────── */
.legal-hero-body {
  position: relative;
  z-index: 1;
  padding-top: 36px;
  text-align: center;
}

.legal-hero-body .eyebrow {
  margin-bottom: 22px;
}

.legal-hero-body h1 {
  margin: 0 0 18px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
}

.legal-subtitle {
  max-width: 54ch;
  margin: 0 auto 28px;
  color: rgba(218, 228, 255, 0.76);
  font-size: 1.05rem;
  line-height: 1.75;
}

.legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(151, 174, 255, 0.14);
  color: rgba(180, 205, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 500;
}

.legal-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #63d8ff, #8a63ff);
  flex-shrink: 0;
}

/* ── Main content area ────────────────────────────────────── */
.legal-body {
  background: var(--bg-light);
  padding: 64px 0 88px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 52px;
  align-items: start;
}

/* ── TOC sidebar ──────────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 28px;
  padding: 22px 20px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 8px 28px rgba(10, 20, 54, 0.06);
}

.legal-toc-title {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.legal-toc-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-toc-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 2px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.legal-toc-links a:hover {
  background: rgba(77, 103, 255, 0.07);
  color: var(--blue);
  border-left-color: var(--blue);
}

.legal-toc-divider {
  height: 1px;
  background: var(--panel-border);
  margin: 12px 0;
}

.legal-toc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.legal-toc-back:hover {
  color: var(--blue);
}

.legal-toc-back svg {
  flex-shrink: 0;
}

/* ── Article content ──────────────────────────────────────── */
.legal-article {
  min-width: 0;
}

.legal-intro {
  padding: 26px 28px;
  margin-bottom: 36px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 18px rgba(10, 20, 54, 0.05);
}

.legal-intro p {
  margin: 0;
  color: #3e4d72;
  line-height: 1.85;
  font-size: 0.975rem;
}

.legal-intro p + p {
  margin-top: 12px;
}

.legal-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--panel-border);
}

.legal-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.legal-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.38rem;
  font-weight: 700;
  color: #111938;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(108, 121, 255, 0.1), rgba(87, 212, 255, 0.07));
  border: 1px solid rgba(108, 121, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
  font-family: "Space Grotesk", sans-serif;
}

.legal-section h3 {
  margin: 22px 0 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1a2340;
}

.legal-section p {
  margin: 0 0 14px;
  color: #47547a;
  line-height: 1.88;
  font-size: 0.965rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-section li {
  color: #47547a;
  line-height: 1.82;
  font-size: 0.965rem;
  margin-bottom: 6px;
}

/* ── Highlight box ────────────────────────────────────────── */
.legal-highlight {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 22px;
  margin: 18px 0;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 121, 255, 0.06), rgba(87, 212, 255, 0.04));
  border: 1px solid rgba(108, 121, 255, 0.13);
}

.legal-highlight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.legal-highlight p {
  margin: 0;
  font-weight: 500;
  color: #2a3560;
  font-size: 0.955rem;
  line-height: 1.75;
}

/* ── Contact cards ────────────────────────────────────────── */
.legal-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.legal-contact-card {
  padding: 18px 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 14px rgba(10, 20, 54, 0.05);
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-soft);
  margin-bottom: 7px;
}

.contact-value {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.5;
}

.contact-value a {
  color: var(--blue);
}

/* ── Data deletion steps ──────────────────────────────────── */
.deletion-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
}

.deletion-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 22px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 4px 14px rgba(10, 20, 54, 0.05);
  transition: box-shadow 160ms ease;
}

.deletion-step:hover {
  box-shadow: 0 8px 28px rgba(77, 103, 255, 0.1);
}

.deletion-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6c79ff, #57d4ff);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  font-family: "Space Grotesk", sans-serif;
}

.deletion-step-body h3 {
  margin: 0 0 5px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #111938;
}

.deletion-step-body p {
  margin: 0;
  font-size: 0.915rem;
  color: var(--text-soft);
  line-height: 1.72;
}

/* ── Retention table ──────────────────────────────────────── */
.retention-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.92rem;
}

.retention-table thead th {
  padding: 12px 16px;
  text-align: left;
  background: linear-gradient(135deg, rgba(108, 121, 255, 0.08), rgba(87, 212, 255, 0.05));
  border-bottom: 2px solid rgba(108, 121, 255, 0.14);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #111938;
  font-size: 0.86rem;
}

.retention-table thead th:first-child {
  border-radius: 10px 0 0 0;
}

.retention-table thead th:last-child {
  border-radius: 0 10px 0 0;
}

.retention-table tbody tr {
  border-bottom: 1px solid var(--panel-border);
}

.retention-table tbody tr:last-child {
  border-bottom: none;
}

.retention-table tbody td {
  padding: 12px 16px;
  color: #47547a;
  vertical-align: top;
  line-height: 1.6;
}

.retention-table tbody td:first-child {
  font-weight: 600;
  color: #1a2340;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .legal-toc-links a {
    border-left: none;
    border-bottom: 2px solid transparent;
  }

  .legal-toc-links a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--blue);
  }
}

@media (max-width: 600px) {
  .legal-body {
    padding: 40px 0 64px;
  }

  .legal-section h2 {
    font-size: 1.18rem;
  }

  .legal-intro {
    padding: 18px 18px;
  }

  .retention-table {
    font-size: 0.85rem;
  }

  .retention-table thead th,
  .retention-table tbody td {
    padding: 10px 12px;
  }
}
