/* ==========================================================================
   0fa.site — Legal, Privacy, Security & Content Pages Stylesheet
   Midnight Portal Theme • Atmospheric • High Legibility • WCAG AA
   ========================================================================== */

:root {
  --bg: #080b18;
  --surface: #101629;
  --surface-elevated: #151b33;
  --surface-card: rgba(16, 22, 41, 0.90);
  --border: rgba(165, 175, 255, 0.15);
  --border-focus: #8b3dff;

  --primary: #8b3dff;
  --primary-hover: #9d54ff;
  --primary-glow: rgba(139, 61, 255, 0.35);
  --accent: #426bff;

  --text-main: #ffffff;
  --text-sub: #cbd2eb;
  --text-muted: #848fae;

  --success: #36d6ae;
  --danger: #ff5c77;
  --warning: #fbbf24;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-card: 20px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Atmosphere */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(139, 61, 255, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(66, 107, 255, 0.10) 0%, transparent 45%),
    #080b18;
}

/* Header Navigation */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 24, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.legal-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #8b3dff, #426bff);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(139, 61, 255, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-btn {
  padding: 0.45rem 1rem;
  background: rgba(139, 61, 255, 0.15);
  border: 1px solid rgba(139, 61, 255, 0.4);
  color: #c4a1ff;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(139, 61, 255, 0.35);
}

/* Page Layout */
.page-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  position: relative;
  z-index: 10;
  flex: 1;
}

/* Hero Header */
.page-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--text-sub);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  background: rgba(54, 214, 174, 0.12);
  border: 1px solid rgba(54, 214, 174, 0.3);
  color: var(--success);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.page-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-lead {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 780px;
  line-height: 1.6;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Content Grid & Layout */
.content-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Sticky Sidebar Table of Contents */
.toc-sidebar {
  position: sticky;
  top: 5rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
}

.toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.toc-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  display: block;
  transition: all 0.15s ease;
}

.toc-link:hover {
  color: #fff;
  background: rgba(139, 61, 255, 0.12);
  padding-left: 0.75rem;
}

/* Article Styling */
.legal-article {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2.25rem 2.5rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .legal-article {
    padding: 1.5rem 1.25rem;
  }
}

.legal-article section {
  margin-bottom: 2.75rem;
}

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

.legal-article h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.legal-article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f8;
  margin: 1.5rem 0 0.65rem;
}

.legal-article p {
  color: var(--text-sub);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

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

.legal-article ul, .legal-article ol {
  color: var(--text-sub);
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.legal-article li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-article strong {
  color: #fff;
}

.legal-article a {
  color: #c4a1ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-article a:hover {
  color: #fff;
}

/* Callout Boxes */
.callout {
  padding: 1.25rem;
  border-radius: var(--radius-control);
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  background: rgba(16, 22, 41, 0.6);
  display: flex;
  gap: 1rem;
}

.callout-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.callout-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.callout-content p {
  font-size: 0.88rem;
  margin-bottom: 0;
}

.callout.callout-success {
  background: rgba(54, 214, 174, 0.08);
  border-color: rgba(54, 214, 174, 0.3);
}

.callout.callout-primary {
  background: rgba(139, 61, 255, 0.09);
  border-color: rgba(139, 61, 255, 0.35);
}

.callout.callout-warning {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.3);
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

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

.legal-table th {
  background: rgba(21, 27, 51, 0.8);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.legal-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(165, 175, 255, 0.08);
  color: var(--text-sub);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table code {
  font-family: var(--font-mono);
  background: rgba(139, 61, 255, 0.15);
  color: #c4a1ff;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-elevated);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem 1.15rem;
  color: var(--text-sub);
  font-size: 0.92rem;
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Contact Cards Grid */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.contact-card {
  padding: 1.5rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem 0;
  color: #fff;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-btn {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: rgba(139, 61, 255, 0.2);
  border: 1px solid rgba(139, 61, 255, 0.4);
  color: #c4a1ff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

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

/* Global Footer */
.site-footer {
  background: rgba(6, 8, 18, 0.95);
  border-top: 1px solid var(--border);
  padding: 3.5rem 1.5rem 2rem;
  position: relative;
  z-index: 10;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 840px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 540px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.75rem;
  max-width: 340px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-list a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-nav-list a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(165, 175, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Cookie Consent Bar */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 760px);
  z-index: 9999;
  background: rgba(16, 22, 41, 0.95);
  border: 1px solid rgba(165, 175, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75), 0 0 25px rgba(139, 61, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.15rem;
  }
}

.cookie-text {
  font-size: 0.84rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.cookie-text strong {
  color: #fff;
}

.cookie-text a {
  color: #c4a1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-cookie-accept {
  padding: 0.5rem 1.15rem;
  background: var(--primary);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-cookie-accept:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(139, 61, 255, 0.4);
}

.btn-cookie-settings {
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cookie-settings:hover {
  color: #fff;
  border-color: var(--border-strong);
}
