/* ====================================================
   DESIGN SYSTEM & RESET (Maintained from WebLynx Orbit)
==================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds - Light Theme */
  --bg-base: #FFFFFF;
  --bg-elevated: #FAFAFA;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-subtle: #F4F4F5;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.12);

  /* Text */
  --text-primary: #000000;
  --text-secondary: #444444;
  --text-muted: #888888;

  /* Accents */
  --accent-blue: #0066FF;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #000000 0%, #333333 100%);
  --gradient-text: linear-gradient(135deg, #000000 0%, #555555 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.4s var(--ease-out);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-elevated); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #000, #333);
  border-radius: 10px;
  border: 2px solid var(--bg-base);
}
::selection { background: #000; color: #fff; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

p { color: var(--text-secondary); margin-bottom: 1rem; }

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
a:hover { color: var(--text-primary); }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--text-primary);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 5vw, 2.5rem);
  padding-right: clamp(1.25rem, 5vw, 2.5rem);
  position: relative;
  z-index: 1;
}

/* ====================================================
   BUTTONS
==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  color: #fff;
}

/* ====================================================
   SCROLL PROGRESS
==================================================== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--text-primary);
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

/* ====================================================
   NAVIGATION
==================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all var(--transition-base);
  background: transparent;
}
.navbar.scrolled {
  padding: 0.75rem 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: transform var(--transition-base);
  min-width: 0;
}
.logo:hover { transform: scale(1.02); color: var(--text-primary); }

.logo-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .brand { font-size: 1.1rem; letter-spacing: -0.01em; }
.logo-text .tag {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s var(--ease-out);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}
.nav-links a:hover::after { width: 24px; }

.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition-base);
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====================================================
   LEGAL PAGE STYLES
==================================================== */
.legal-main {
  padding-top: 8rem; /* Offset for fixed navbar */
  padding-bottom: 4rem;
  min-height: 80vh;
}

.legal-header {
  text-align: center;
  margin-bottom: 4rem;
}
.legal-header h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.legal-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.legal-controls {
  margin-bottom: 3rem;
}
.toggle-btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-toggle {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.legal-toggle:hover {
  border-color: var(--text-primary);
  background: var(--bg-subtle);
}

.legal-toggle.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Modern CSS Grid trick for smooth height transitions */
.legal-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s var(--ease-out), opacity 0.4s var(--ease-out);
}

.legal-panel.active {
  grid-template-rows: 1fr;
  opacity: 1;
}

.legal-panel-content {
  overflow: hidden; /* Crucial for the grid 0fr trick to work */
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.legal-panel-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-panel-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-panel-content ul {
  list-style: none;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-panel-content ul li {
  position: relative;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.legal-panel-content ul li::before {
  content: '◆';
  color: var(--accent-blue);
  font-size: 0.625rem;
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
}

.legal-panel-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ====================================================
   FOOTER
==================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  background: #000000;
  position: relative;
  z-index: 1;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo { margin-bottom: 1.25rem; color: #fff; }
.footer-brand .logo .brand { color: #fff; }
.footer-brand .logo .tag { color: #aaa; }
.footer-brand p {
  color: #888;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  transition: opacity var(--transition-base);
}
.social-link svg { position: relative; z-index: 1; transition: all var(--transition-base); }
.social-link:hover {
  border-color: #fff;
  transform: translateY(-3px);
  color: #000;
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}
.social-link:hover::before { opacity: 1; }
.social-link:hover svg { color: #000; }

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul a {
  color: #888;
  font-size: 0.9375rem;
  transition: all 0.2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.footer-col ul a:hover {
  color: #fff;
  transform: translateX(4px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.875rem; color: #666; }
.footer-bottom .legal {
  display: flex;
  gap: 1.5rem;
}
.footer-bottom .legal a {
  font-size: 0.875rem;
  color: #666;
}
.footer-bottom .legal a:hover { color: #fff; }

/* ====================================================
   RESPONSIVE
==================================================== */
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .nav-links.mobile-open {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 320px;
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    background: var(--bg-base);
    border-left: 1px solid var(--border-subtle);
    gap: 0.5rem;
    z-index: 100;
  }
  .nav-links.mobile-open a { width: 100%; padding: 0.75rem 1rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .toggle-btn-group { flex-direction: column; width: 100%; }
  .legal-toggle { width: 100%; }
}