/* ============================================
   STARDUST VAULT — LEGAL PAGES DESIGN SYSTEM
   Matches the Landing Page Platinum Light Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@700;800&display=swap');

:root {
  --bg-primary: #F8FBFF;
  --bg-secondary: #FFFFFF;
  --text-primary: #1A1A2E;
  --text-secondary: #4B5563;
  --accent-primary: #2196F3;
  --accent-secondary: #9C27B0;
  --border-subtle: rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glow-color: rgba(33, 150, 243, 0.08);
  --card-bg: #FFFFFF;
  --nav-bg: rgba(248, 251, 255, 0.85);
  --shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
  --selection: rgba(33, 150, 243, 0.2);
}

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

::selection {
  background: var(--selection);
  color: var(--text-primary);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.4s ease;
}

.navbar.scrolled {
  padding: 0.6rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 2px;
  font-family: 'Outfit', sans-serif;
}

.brand svg {
  width: 30px;
  height: 30px;
  stroke: var(--accent-primary);
  animation: iconPulse 3s ease-in-out infinite;
}

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

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  opacity: 0.7;
  padding: 0.6rem 1.4rem;
  border-radius: 99px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
  background: var(--glow-color);
  color: var(--accent-primary);
}

.nav-links a.active {
  opacity: 1;
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 8px 20px -6px rgba(33, 150, 243, 0.4);
}

/* ============================================
   HERO HEADER SECTION
   ============================================ */
.hero-header {
  position: relative;
  padding: 10rem 2rem 6rem;
  text-align: center;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(33, 150, 243, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(156, 39, 176, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(33, 150, 243, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

.hero-glow-1 {
  top: -100px;
  right: -100px;
  background: rgba(33, 150, 243, 0.12);
  animation: drift 12s ease-in-out infinite;
}

.hero-glow-2 {
  bottom: -150px;
  left: -100px;
  background: rgba(156, 39, 176, 0.08);
  animation: drift 15s ease-in-out infinite reverse;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 2rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  box-shadow:
    0 20px 50px rgba(33, 150, 243, 0.12),
    inset 0 2px 10px rgba(255, 255, 255, 0.5);
  animation: floatIcon 4s ease-in-out infinite;
  position: relative;
}

.hero-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: -15px;
  border: 1px solid rgba(33, 150, 243, 0.15);
  border-radius: 2.5rem;
  animation: pulseRing 3s ease-out infinite;
}

.hero-icon-wrapper svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent-primary);
  filter: drop-shadow(0 0 12px rgba(33, 150, 243, 0.3));
}

.hero-header h1 {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--text-primary);
  animation: fadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-header h1 span {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
  animation: fadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  background: rgba(33, 150, 243, 0.08);
  border: 1px solid rgba(33, 150, 243, 0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  animation: fadeSlideUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent-primary);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-wrapper {
  max-width: 860px;
  margin: -3rem auto 0;
  padding: 0 2rem 4rem;
  position: relative;
  z-index: 2;
}

.content-card {
  background: var(--card-bg);
  border-radius: 2rem;
  padding: 3.5rem 3.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 20px 60px -15px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* --- Section Headers --- */
h2.section-heading {
  color: var(--text-primary);
  font-size: 1.35rem;
  margin-top: 3rem;
  margin-bottom: 1.2rem;
  padding-left: 18px;
  position: relative;
  font-family: 'Outfit', sans-serif;
}

h2.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

h2.section-heading:first-of-type {
  margin-top: 0;
}

h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

/* --- Paragraphs & Lists --- */
p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.content-card > p:first-child {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.85;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

ul {
  padding-left: 0;
  margin-bottom: 1.5rem;
}

li {
  list-style: none;
  position: relative;
  padding: 0.7rem 0 0.7rem 2rem;
  margin-bottom: 0.25rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

li:hover {
  background: var(--glow-color);
  padding-left: 2.2rem;
}

li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

li strong {
  color: var(--text-primary);
}

/* --- Highlighted text --- */
.highlight {
  color: var(--accent-primary);
  font-weight: 700;
}

/* --- Scroll-triggered section animations --- */
.animate-section {
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   TABLE OF CONTENTS (Sidebar-style)
   ============================================ */
.toc-wrapper {
  position: sticky;
  top: 100px;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border-radius: 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
}

.toc-wrapper h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.toc-wrapper a {
  display: block;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0;
  transition: all 0.3s ease;
  font-weight: 500;
}

.toc-wrapper a:hover {
  color: var(--accent-primary);
  padding-left: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.page-footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 2px;
  font-family: 'Outfit', sans-serif;
}

.footer-brand svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
}

.page-footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(60px, 40px); }
  100% { transform: translate(0, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .navbar .nav-inner {
    padding: 0 1rem;
  }

  .brand {
    font-size: 1.15rem;
    letter-spacing: 1px;
  }

  .brand svg {
    width: 24px;
    height: 24px;
  }

  .nav-links a:not(.active) {
    display: none;
  }

  .hero-header {
    padding: 8rem 1.5rem 4rem;
  }

  .hero-icon-wrapper {
    width: 75px;
    height: 75px;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .hero-icon-wrapper svg {
    width: 36px;
    height: 36px;
  }

  .hero-header h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .content-wrapper {
    margin-top: -1.5rem;
    padding: 0 1rem 3rem;
  }

  .content-card {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
  }

  h2.section-heading {
    font-size: 1.15rem;
    margin-top: 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}
