/* ==========================================================================
   Enigmix Privacy Policy - Stylesheet (Modern & Premium Aesthetics)
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* HSL Light Palette */
  --bg-primary: hsl(220, 20%, 97%);
  --bg-surface: hsl(0, 0%, 100%);
  --bg-surface-elevated: hsl(220, 25%, 95%);
  --text-primary: hsl(222, 47%, 11%);
  --text-secondary: hsl(215, 16%, 47%);
  --text-muted: hsl(215, 16%, 62%);

  /* Accent & Brand Colors */
  --brand-primary: hsl(245, 75%, 60%);
  --brand-primary-hover: hsl(245, 75%, 52%);
  --brand-glow: hsla(245, 75%, 60%, 0.15);

  --accent-blue: hsl(210, 100%, 56%);
  --accent-green: hsl(150, 70%, 40%);
  --accent-amber: hsl(38, 92%, 50%);

  /* Borders & Shadows */
  --border-color: hsl(220, 15%, 88%);
  --border-subtle: hsl(220, 15%, 93%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.08);

  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-primary: hsl(224, 25%, 8%);
  --bg-surface: hsl(224, 25%, 12%);
  --bg-surface-elevated: hsl(224, 22%, 16%);
  --text-primary: hsl(210, 40%, 96%);
  --text-secondary: hsl(215, 20%, 75%);
  --text-muted: hsl(215, 15%, 55%);

  --brand-primary: hsl(245, 85%, 68%);
  --brand-primary-hover: hsl(245, 85%, 75%);
  --brand-glow: hsla(245, 85%, 68%, 0.25);

  --border-color: hsl(224, 20%, 20%);
  --border-subtle: hsl(224, 20%, 15%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.5);

  --glass-bg: rgba(18, 22, 33, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* Base Reset & Globals */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
.sun-icon { display: none; }
.moon-icon { display: block; }

/* Hero Section */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--brand-glow), transparent 70%);
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.meta-info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

/* Sidebar TOC */
.sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.search-box {
  margin-bottom: 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-box input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 70vh;
  overflow-y: auto;
}

.toc-link {
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s ease;
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-link:hover {
  background: var(--bg-surface-elevated);
  color: var(--brand-primary);
  text-decoration: none;
}

.toc-link.active {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
}

/* Content Area & Sections */
.content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.policy-card, .policy-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.policy-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

/* Summary Card */
.summary-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-surface-elevated));
  border: 1px solid var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.summary-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.summary-item {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.summary-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.summary-item p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.4;
}

.check-icon {
  font-size: 1.4rem;
}

/* Data Cards Grid */
.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.data-card {
  background: var(--bg-surface-elevated);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.data-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.data-card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.data-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.data-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Styled Lists */
.styled-list {
  list-style: none;
  margin-top: 0.75rem;
}

.styled-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.styled-list li::before {
  content: "•";
  color: var(--brand-primary);
  font-weight: bold;
  font-size: 1.4rem;
  position: absolute;
  left: 0.3rem;
  top: -0.2rem;
}

/* Legal Cards Grid */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.legal-card {
  background: var(--bg-surface-elevated);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.legal-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--brand-primary);
}

.legal-card p {
  font-size: 0.83rem;
  margin-bottom: 0;
}

/* Vendors Table */
.vendors-table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.vendors-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.vendors-table th, .vendors-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.vendors-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-weight: 600;
}

.vendors-table td {
  color: var(--text-secondary);
}

/* Highlight / Account Deletion Box */
.highlight-box {
  border-left: 4px solid var(--accent-amber);
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.step-num {
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Contact Box */
.contact-box, .contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.contact-card {
  justify-content: flex-start;
}

.contact-icon {
  font-size: 2.2rem;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* Footer */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content p {
  margin-bottom: 0.3rem;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    top: 0;
    margin-bottom: 1.5rem;
  }

  .toc-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }
}
