/* SonicHub — Legal Page Stylesheet */
:root {
  --navy:        #050D1A;
  --navy-mid:    #0A1628;
  --navy-light:  #112240;
  --orange:      #F5C518;
  --orange-dim:  #C9A10F;
  --yellow:      #EB5C25;
  --blue:        #1A6EFF;
  --glass-bg:    rgba(255,255,255,0.05);
  --glass-border:rgba(255,255,255,0.10);
  --text-primary:#EEF2FF;
  --text-muted:  #8A9BB8;
  --text-dim:    #5B6E8A;
  --font-display:'Cormorant Garamond', serif;
  --font-body:   'DM Sans', sans-serif;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   28px;
  --radius-xl:   40px;
  --transition:  0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--navy);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 2px; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-radius: var(--radius-xl);
  background: rgba(5,13,26,0.6);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(245,197,24,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.nav-logo img { height: 38px; width: auto; object-fit: contain; }
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-back:hover { color: var(--orange); }

/* ===== HERO ===== */
.legal-hero {
  padding: 160px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(245,197,24,0.07) 0%, transparent 70%),
    linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
}
.legal-hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.legal-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}
.legal-label::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--orange);
}
.legal-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.legal-title em { font-style: italic; color: var(--orange); }
.legal-updated {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ===== SIDEBAR NAV ===== */
.legal-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  align-items: start;
}
.legal-sidebar {
  position: sticky;
  top: 100px;
}
.legal-sidebar nav {
  position: static;
  transform: none;
  width: auto;
  max-width: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: none;
  box-shadow: none;
  top: auto; left: auto;
}
.legal-sidebar a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}
.legal-sidebar a:hover,
.legal-sidebar a.active {
  background: rgba(245,197,24,0.08);
  color: var(--orange);
}

/* ===== CONTENT ===== */
.legal-content { min-width: 0; }
.legal-section {
  padding-top: 60px;
  margin-bottom: 60px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.legal-section:first-child { border-top: none; padding-top: 0; }

.legal-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.legal-section-label::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--orange);
}
.legal-section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 28px;
  line-height: 1.2;
}
.legal-section h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 10px;
}
.legal-section p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.legal-section ul, .legal-section ol {
  margin: 0 0 16px 0;
  padding-left: 20px;
}
.legal-section li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 6px;
}
.legal-section a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,197,24,0.3);
  transition: border-color var(--transition);
}
.legal-section a:hover { border-color: var(--orange); }
.legal-highlight {
  background: rgba(245,197,24,0.05);
  border: 1px solid rgba(245,197,24,0.15);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.legal-highlight p { margin-bottom: 0; font-size: 0.88rem; }

/* ===== FOOTER ===== */
.legal-footer {
  background: var(--navy-mid);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 32px 20px;
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
.legal-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.legal-footer a { color: var(--text-dim); text-decoration: none; transition: color var(--transition); }
.legal-footer a:hover { color: var(--orange); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { width: calc(100% - 24px); padding: 12px 18px; top: 10px; }
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .legal-sidebar { display: none; }
}
@media (max-width: 480px) {
  .legal-hero { padding: 130px 16px 60px; }
  .legal-layout { padding: 0 16px 60px; }
  .legal-footer { padding: 24px 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .legal-footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
}