/* ═══════════════════════════════════════════════════════════════
   KRITEXA LABS — LEGAL PAGES CSS
   css/pages/legal.css
   Phase 25 — Legal Pages Structure

   PURPOSE:
     Styles for all six Legal Pages:
       /legal/privacy-policy
       /legal/data-protection
       /legal/terms
       /legal/cookie-policy
       /legal/disclaimer
       /legal/grievance

     All six pages share this single CSS file. The tab navigation
     highlights the active page via a per-page data attribute:
       <body data-legal-page="privacy-policy">

   STRUCTURE:
     1. Legal hero / page header
     2. Tab navigation (.legal-tabs)
     3. Content area (.legal-content)
     4. Responsive breakpoints
     5. Reduced-motion overrides
     6. Focus-visible states

   CSS LOAD ORDER:
     global.css → utilities.css → header.css → footer.css
     → components.css → css/pages/legal.css

   SCOPING:
     All selectors are prefixed .legal-* to prevent conflicts
     with any other page.
═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. LEGAL PAGE HERO / HEADER AREA
   Matches inner-page hero pattern used across the site.
═══════════════════════════════════════════════════════════════ */

.legal-hero {
  position: relative;
  padding: 80px 0 40px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.14);
  overflow: hidden;
}

/* Ambient radial glow behind headline — matches site-wide pattern */
.legal-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 360px;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(124, 58, 237, 0.09), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.legal-hero .container {
  position: relative;
  z-index: 1;
}

.legal-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(236, 72, 153, 0.9);
  font-family: var(--font-family-mono);
  margin-bottom: 16px;
}

.legal-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: rgba(236, 72, 153, 0.7);
  flex-shrink: 0;
}

.legal-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: 16px;
}

.legal-hero-desc {
  font-size: 15px;
  color: rgba(161, 161, 170, 0.82);
  line-height: 1.65;
  max-width: 540px;
}


/* ═══════════════════════════════════════════════════════════════
   2. LEGAL TAB NAVIGATION
   Horizontal scrollable tab row.
   Active tab determined by [data-legal-page] on <body>.
═══════════════════════════════════════════════════════════════ */

.legal-tabs-wrap {
  position: sticky;
  top: 72px;            /* clear the site header */
  z-index: 80;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.18);
}

.legal-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
  padding: 0;
  margin: 0;
  list-style: none;
}

.legal-tabs::-webkit-scrollbar {
  display: none;               /* Chrome/Safari */
}

.legal-tab {
  flex-shrink: 0;
}

.legal-tab a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 16px 20px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(161, 161, 170, 0.72);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease;
  position: relative;
}

.legal-tab a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(124, 58, 237, 0.06);
}

/* Active tab — driven by [data-legal-page] on <body> */
.legal-tab a.legal-tab-active {
  color: #f472b6;
  border-bottom-color: #ec4899;
  font-weight: 600;
  background: rgba(236, 72, 153, 0.06);
}

/* Tab dot badge — active indicator dot */
.legal-tab a.legal-tab-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(236, 72, 153, 0.35);
}


/* ═══════════════════════════════════════════════════════════════
   3. LEGAL CONTENT AREA
   Shared wrapper for all six legal page content bodies.
═══════════════════════════════════════════════════════════════ */

.legal-content-section {
  padding: 64px 0 100px;
  position: relative;
  z-index: 1;
}

.legal-content-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

/* Left sidebar — page metadata / quick-reference */
.legal-sidebar {
  position: sticky;
  top: 132px;           /* header (72) + tab bar (60) */
  padding: 24px 20px;
  background: rgba(20, 16, 36, 0.7);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(139, 92, 246, 0.72);
  font-family: var(--font-family-mono);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.16);
}

.legal-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-meta-item {
  font-size: 12px;
  color: rgba(161, 161, 170, 0.78);
  line-height: 1.55;
}

.legal-meta-item strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 198, 218, 0.85);
  margin-bottom: 2px;
  font-family: var(--font-family-mono);
  letter-spacing: .04em;
}

/* Right: main content body */
.legal-body {
  min-width: 0;
}

.legal-body-title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   LEGAL PROSE CONTENT
   Styles for the actual policy body text — headings, paragraphs,
   lists, notices, and inline highlights.
═══════════════════════════════════════════════════════════════ */

/* Section block: heading + body */
.legal-section {
  margin-bottom: 44px;
}

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

/* Section heading (e.g. "1. Who We Are") */
.legal-section-heading {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 700;
  color: rgba(200, 198, 218, 0.95);
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.16);
  line-height: 1.3;
}

/* Sub-heading within a section */
.legal-section-subheading {
  font-size: 14px;
  font-weight: 600;
  color: rgba(200, 198, 218, 0.82);
  letter-spacing: 0;
  margin: 20px 0 8px;
  line-height: 1.4;
}

/* Body paragraph */
.legal-section p {
  font-size: 14px;
  color: rgba(161, 161, 170, 0.82);
  line-height: 1.75;
  margin-bottom: 14px;
}

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

/* Unordered / ordered lists */
.legal-section ul,
.legal-section ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-section ul li,
.legal-section ol li {
  font-size: 14px;
  color: rgba(161, 161, 170, 0.82);
  line-height: 1.75;
  margin-bottom: 6px;
}

.legal-section ul li:last-child,
.legal-section ol li:last-child {
  margin-bottom: 0;
}

/* Inline emphasis highlight (legal term, act name) */
.legal-em {
  color: rgba(139, 92, 246, 0.9);
  font-weight: 500;
}

/* Notice / callout box */
.legal-notice {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-left: 3px solid rgba(139, 92, 246, 0.55);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 18px 0;
}

.legal-notice p {
  font-size: 13px;
  color: rgba(161, 161, 170, 0.85);
  line-height: 1.65;
  margin-bottom: 0 !important;
}

.legal-notice strong {
  color: rgba(200, 198, 218, 0.9);
  font-weight: 600;
}

/* Policy meta row (Effective Date / Last Updated) */
.legal-policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  background: rgba(20, 16, 36, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 40px;
}

.legal-policy-meta-item {
  font-size: 12px;
  color: rgba(161, 161, 170, 0.72);
  line-height: 1.5;
}

.legal-policy-meta-item strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(200, 198, 218, 0.8);
  font-family: var(--font-family-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Table of contents */
.legal-toc {
  background: rgba(20, 16, 36, 0.55);
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 40px;
}

.legal-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(139, 92, 246, 0.72);
  font-family: var(--font-family-mono);
  margin-bottom: 12px;
}

.legal-toc ol {
  padding-left: 18px;
  margin: 0;
}

.legal-toc ol li {
  font-size: 13px;
  color: rgba(161, 161, 170, 0.75);
  line-height: 1.6;
  margin-bottom: 4px;
}

.legal-toc ol li a {
  color: rgba(139, 92, 246, 0.82);
  text-decoration: none;
  transition: color .15s ease;
}

.legal-toc ol li a:hover {
  color: rgba(167, 139, 250, 1);
}

/* Contact block inside policy */
.legal-contact-block {
  background: rgba(20, 16, 36, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  padding: 22px 24px;
  margin-top: 12px;
}

.legal-contact-block p {
  font-size: 13.5px;
  margin-bottom: 8px !important;
}

.legal-contact-block a {
  color: rgba(139, 92, 246, 0.9);
  text-decoration: none;
  transition: color .15s ease;
}

.legal-contact-block a:hover {
  color: rgba(167, 139, 250, 1);
}

/* Responsive prose */
@media (max-width: 768px) {
  .legal-section {
    margin-bottom: 36px;
  }

  .legal-section-heading {
    font-size: 15px;
  }

  .legal-policy-meta {
    padding: 14px 16px;
    gap: 12px 24px;
  }

  .legal-toc {
    padding: 16px 18px;
  }

  .legal-contact-block {
    padding: 18px 18px;
  }
}


/* Placeholder block — will be replaced when real content is added */
.legal-placeholder {
  background: rgba(20, 16, 36, 0.55);
  border: 1px dashed rgba(124, 58, 237, 0.26);
  border-radius: 14px;
  padding: 48px 40px;
  text-align: center;
}

.legal-placeholder-icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: rgba(139, 92, 246, 0.45);
}

.legal-placeholder-heading {
  font-size: 17px;
  font-weight: 600;
  color: rgba(200, 198, 218, 0.8);
  margin-bottom: 10px;
}

.legal-placeholder-text {
  font-size: 14px;
  color: rgba(139, 137, 163, 0.7);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto;
}


/* ═══════════════════════════════════════════════════════════════
   4. RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════════════════ */

/* ── 1024px: shrink sidebar ── */
@media (max-width: 1024px) {
  .legal-content-grid {
    grid-template-columns: 180px 1fr;
    gap: 32px;
  }
}

/* ── 768px: collapse sidebar below content ── */
@media (max-width: 768px) {
  .legal-hero {
    padding: 60px 0 32px;
  }

  .legal-tabs-wrap {
    top: 64px;
  }

  .legal-content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .legal-sidebar {
    position: static;
    top: auto;
  }

  .legal-content-section {
    padding: 40px 0 80px;
  }

  .legal-tab a {
    padding: 14px 16px 12px;
    font-size: 12.5px;
  }

  .legal-placeholder {
    padding: 36px 24px;
  }
}

/* ── 480px ── */
@media (max-width: 480px) {
  .legal-hero h1 {
    letter-spacing: -0.5px;
  }

  .legal-tab a {
    padding: 12px 14px 11px;
    font-size: 12px;
    gap: 5px;
  }

  .legal-placeholder {
    padding: 28px 20px;
  }

  .legal-body-title {
    font-size: 20px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   5. REDUCED MOTION
═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .legal-tab a,
  .legal-hero::before {
    transition: none;
    animation: none;
  }
}


/* ═══════════════════════════════════════════════════════════════
   6. FOCUS VISIBLE
═══════════════════════════════════════════════════════════════ */

.legal-tab a:focus-visible {
  outline: 2px solid rgba(139, 92, 246, 0.85);
  outline-offset: -2px;
  border-radius: 3px;
}
