/* ============================================
   Page Body Styles - Conservatory
   ============================================ */

html:has(.body-page) {
  background-image: none;
  scroll-padding-top: 140px;
  scroll-behavior: smooth;
}

body:has(.body-page) .navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
}

body:has(.body-page) .navbar-container>div:empty {
  display: none;
}

body:has(.body-page) .navbar-logo {
  margin-right: auto;
}

body:has(.body-page) .navbar-actions {
  margin-left: auto;
}

@media (max-width: 1024px) {
  body:has(.body-page) .navbar-hamburger {
    margin-left: auto;
  }
}

/* Body Page Section */
.body-page {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 80px);
  padding: 120px 0 80px;
  background: #020410;
  overflow: hidden;
}

.body-page__container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.body-page__title {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 48px;

  background: linear-gradient(135deg,
      #FFFFFF 0%,
      #E0E7FF 50%,
      #C7D2FE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Page Content */
.body-page__content {
  font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #CBD2D9;
}

.body-page__content p {
  margin: 0 0 24px;
}

.body-page__content p:last-child {
  margin-bottom: 0;
}

/* Headings within content */
.body-page__content h2 {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 48px 0 20px;
  /* Override global gradient */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
}

.body-page__content h2:first-child {
  margin-top: 0;
}

.body-page__content h3 {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 32px 0 16px;
  /* Override global gradient */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
}

.body-page__content h3:first-child {
  margin-top: 0;
}

/* Links within content */
.body-page__content a {
  color: #0055f3;
  text-decoration: none;
  transition: color 0.2s ease;
}

.body-page__content a:hover {
  color: #0066ff;
  text-decoration: underline;
}

.body-page__content a:focus-visible {
  outline: 2px solid #0055f3;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Lists within content */
.body-page__content ul,
.body-page__content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.body-page__content li {
  margin-bottom: 8px;
  color: #CBD2D9;
}

.body-page__content li:last-child {
  margin-bottom: 24px;
}

/* Code blocks */
.body-page__content code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 14px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #E0E7FF;
}

.body-page__content pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 24px 0;
}

.body-page__content pre code {
  background: none;
  border: none;
  padding: 0;
}

/* Blockquotes */
.body-page__content blockquote {
  margin: 0 0 24px;
  padding-left: 20px;
  border-left: 3px solid #818CF8;
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
}

/* Mailchimp Waitlist Form */
#mce-response {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  background-color: #f8f9fa;
  text-align: center;
  transition: opacity 0.3s ease;
}

/* Horizontal rules */
.body-page__content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%);
  margin: 48px 0;
}

/* Tables */
.body-page__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
}

.body-page__content th,
.body-page__content td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.body-page__content th {
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.03);
}

.body-page__content tr:last-child td {
  border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  html:has(.body-page) {
    scroll-padding-top: 120px;
  }

  .body-page__content section,
  .body-page__content h2,
  .body-page__content h3,
  .body-page__content h4 {
    scroll-margin-top: 120px;
    padding-top: 24px;
  }

  .body-page {
    padding: 100px 0 60px;
  }

  .body-page__title {
    font-size: 36px;
    margin-bottom: 32px;
  }

  .body-page__content {
    font-size: 15px;
  }

  .body-page__content h2 {
    font-size: 24px;
    margin: 36px 0 16px;
  }

  .body-page__content h3 {
    font-size: 20px;
    margin: 28px 0 12px;
  }
}

@media (max-width: 480px) {
  .body-page {
    padding: 80px 0 40px;
  }

  .body-page__title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .body-page__content {
    font-size: 14px;
  }

  .body-page__content h2 {
    font-size: 20px;
    margin: 28px 0 12px;
  }

  .body-page__content h3 {
    font-size: 18px;
    margin: 24px 0 10px;
  }
}

/* ============================================
   Documentation-specific Styles
   ============================================ */

/* Intro Text */
.body-page__content .intro-text {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 32px;
  font-weight: 400;
}

/* Table of Contents */
.body-page__content .toc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px 32px;
  margin: 0 0 48px;
}

.body-page__content .toc h2 {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 16px;
  /* Override global gradient */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
}

.body-page__content .toc ol {
  margin: 0;
  padding-left: 20px;
  counter-reset: toc-counter;
  list-style: none;
}

.body-page__content .toc li {
  margin-bottom: 10px;
  counter-increment: toc-counter;
  position: relative;
}

.body-page__content .toc li::before {
  content: counter(toc-counter) ".";
  position: absolute;
  left: -20px;
  color: #818CF8;
  font-weight: 600;
}

.body-page__content .toc li:last-child {
  margin-bottom: 0;
}

.body-page__content .toc a {
  color: #CBD2D9;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
}

.body-page__content .toc a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.body-page__content .toc a:focus-visible {
  outline: 2px solid #818CF8;
  outline-offset: 2px;
  border-radius: 2px;
}

/* H4 Headings */
.body-page__content h4 {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #E0E7FF;
  margin: 24px 0 12px;
  /* Override global gradient */
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #E0E7FF;
  background-clip: unset;
}

.body-page__content h4:first-child {
  margin-top: 0;
}

/* Nested Lists */
.body-page__content ul ul,
.body-page__content ol ul,
.body-page__content ul ol,
.body-page__content ol ol {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Strong emphasis in lists */
.body-page__content li strong {
  color: #FFFFFF;
  font-weight: 600;
}

.body-page__content section {
  margin-bottom: 0;
  scroll-margin-top: 140px;
  padding-top: 32px;
}

.body-page__content h2,
.body-page__content h3,
.body-page__content h4 {
  scroll-margin-top: 140px;
  position: relative;
}

/* Responsive TOC */
@media (max-width: 768px) {
  .body-page__content .intro-text {
    font-size: 16px;
    margin-bottom: 24px;
  }

  .body-page__content .toc {
    padding: 20px 24px;
    margin-bottom: 36px;
  }

  .body-page__content .toc h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .body-page__content .toc ol {
    padding-left: 18px;
  }

  .body-page__content .toc li {
    margin-bottom: 8px;
    font-size: 15px;
  }

  .body-page__content h4 {
    font-size: 17px;
    margin: 20px 0 10px;
  }
}

@media (max-width: 480px) {
  .body-page__content .intro-text {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .body-page__content .toc {
    padding: 16px 20px;
    margin-bottom: 28px;
  }

  .body-page__content .toc h2 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .body-page__content .toc ol {
    padding-left: 16px;
  }

  .body-page__content .toc li {
    margin-bottom: 6px;
    font-size: 14px;
  }

  .body-page__content h4 {
    font-size: 16px;
    margin: 18px 0 8px;
  }
}