/* ═══════════════════════════════════════════════════════════════════
   KOMPACT AI LEGAL & POLICY PAGES STYLESHEET (src/css/legal.css)
   Exact Typography, Spacing, and Navbar Sticky Opaque Behavior
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   NAVBAR OPAQUE STICKY SCROLL BEHAVIOR
───────────────────────────────────────────────────────────── */
.navbar {
  background: transparent !important;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled,
.navbar.menu-open {
  background: rgba(18, 15, 15, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Main layout wrapper */
.legal-page-main {
  position: relative;
  min-height: 100vh;
  padding-top: 140px; /* Space for fixed navbar */
  padding-bottom: 100px;
  width: 100%;
}

.legal-container {
  max-width: 1040px; /* Exact Figma width: 1040px */
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   HERO / TITLE HEADER SECTION (Figma specs: .frame-parent2)
───────────────────────────────────────────────────────────── */
.legal-header {
  text-align: center;
  margin-bottom: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.legal-title {
  font-family: 'Sora', sans-serif;
  font-size: 50px; /* Exact Figma font-size: 50px */
  font-weight: 300; /* Exact Figma font-weight: 300 */
  line-height: 140%;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin: 0;
}

.legal-title .highlight-yellow {
  color: #FFCE1B; /* Exact Figma yellow: #ffce1b */
  font-weight: 300;
}

/* Version & Last Updated Badge (Figma specs: .version-10-parent) */
.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace; /* Exact Figma font */
  font-size: 18px; /* Exact Figma font-size: 18px */
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  line-height: 150%;
}

.legal-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #FB1650; /* Exact Figma red dot: #fb1650 */
  display: inline-block;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   BODY CONTENT TYPOGRAPHY & CLEAN PARAGRAPH SPACING
───────────────────────────────────────────────────────────── */
.legal-content {
  display: flex;
  flex-direction: column;
  gap: 48px; /* Clean gap between major section blocks */
  font-family: 'DM Sans', sans-serif;
  font-size: 18px; /* Exact Figma font-size: 18px */
  line-height: 150%; /* Exact Figma line-height: 150% */
  color: #868484; /* Exact Figma body text color: #868484 */
  font-weight: 300;
}

.legal-intro-block {
  display: block;
}

.legal-intro-block p,
.legal-section p {
  margin: 0 0 12px 0; /* Tight, clean paragraph spacing */
  line-height: 150%;
  color: #868484;
}

.legal-intro-block p:last-child,
.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section {
  display: block;
}

.legal-section-title {
  font-family: 'Sora', sans-serif;
  font-size: 24px; /* Exact Figma section title font-size: 24px */
  font-weight: 300; /* Exact Figma section title font-weight: 300 */
  line-height: 140%;
  color: #FFFFFF; /* Exact Figma header color: #ffffff */
  margin: 0 0 16px 0; /* Spacing between section title and body text */
}

/* Lists and sub-lists */
.legal-list {
  margin: 12px 0 0 0;
  padding-left: 24px;
  list-style-type: decimal;
  display: flex;
  flex-direction: column;
  gap: 8px; /* Tight, clean gap between list items */
}

.legal-list li {
  line-height: 150%;
  color: #868484;
}

/* Bold terms inherit body text color (#868484), NOT bright white */
.legal-list li strong,
.legal-content strong {
  color: inherit; /* Inherits #868484 body text color */
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

.legal-sub-list {
  margin: 12px 0 12px 0;
  padding-left: 24px;
  list-style-type: lower-roman; /* (i), (ii), (iii), (iv) matching Figma EULA format */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-sub-list li {
  line-height: 150%;
  color: #868484;
}

/* Links */
.legal-content a {
  color: #FFCE1B;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: #FFFFFF;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN BREAKPOINTS (Mobile & Tablet Reactive)
───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .legal-container {
    max-width: 90%;
  }

  .legal-title {
    font-size: 42px;
  }
}

@media (max-width: 1024px) {
  .legal-page-main {
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .legal-header {
    margin-bottom: 40px;
  }

  .legal-title {
    font-size: 36px;
  }

  .legal-badge {
    font-size: 16px;
  }

  .legal-content {
    gap: 38px;
    font-size: 16px;
  }

  .legal-section-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .legal-intro-block p,
  .legal-section p {
    margin-bottom: 10px;
  }
}

@media (max-width: 767px) {
  .legal-page-main {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .legal-container {
    padding: 0 20px;
  }

  .legal-header {
    margin-bottom: 48px;
    gap: 10px;
  }

  .legal-title {
    font-size: 28px;
    line-height: 130%;
  }

  .legal-badge {
    font-size: 14px;
    gap: 8px;
  }

  .legal-content {
    gap: 30px;
    font-size: 15px;
    line-height: 160%;
  }

  .legal-section-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .legal-intro-block p,
  .legal-section p {
    margin-bottom: 8px;
  }

  .legal-list,
  .legal-sub-list {
    padding-left: 20px;
    gap: 6px;
  }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE NAVBAR & DROPDOWN SUBHEADINGS (Matching Models Pages)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links.open {
    display: flex !important;
    position: fixed !important;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(14, 12, 12, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 24px 32px 24px !important;
    flex-direction: column !important;
    gap: 8px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    z-index: 9999;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }

  .nav-dropdown-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    align-items: flex-start !important;
  }

  .nav-item {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
  }

  .nav-chevron {
    transition: transform 0.25s ease !important;
  }

  .nav-dropdown-wrapper.open .nav-chevron {
    transform: rotate(180deg) !important;
  }

  .nav-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 8px 0 8px 16px !important;
    margin-top: 4px !important;
    display: none !important;
    width: 100% !important;
    box-shadow: none !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  .nav-dropdown-wrapper.open .nav-dropdown-menu {
    display: flex !important;
  }

  .nav-dropdown-menu a {
    display: block !important;
    padding: 8px 14px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    text-align: left !important;
    border-left: 2px solid rgba(255, 255, 255, 0.15) !important;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease !important;
    border-radius: 0 4px 4px 0 !important;
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a:active,
  .nav-dropdown-menu a:focus {
    color: #FFCE1B !important;
    border-left-color: #FFCE1B !important;
    background: rgba(255, 255, 255, 0.04) !important;
  }
}

@media (max-width: 767px) {
  .nav-links.open {
    top: 64px;
    max-height: calc(100vh - 64px);
    padding: 16px 20px 28px 20px !important;
  }
}




  /* ════════════════════════════════════════════════
     UPPER LINE REMOVAL & FOOTER LOWER LINE RESTORATION (<= 1024px)
  ════════════════════════════════════════════════ */
  /* 1. Restore Footer's own Top Border (Lower Line) */
  body .footer,
  body footer.footer,
  body footer#footer,
  body footer#footer-mobile,
  .footer,
  #footer,
  #footer-mobile {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  /* 2. Hide horizontal line dividers directly above footer */
  .line-horizontal,
  .line-horizontal:last-of-type,
  main > .line-horizontal:last-child {
    display: none !important;
    border: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 3. Hide dummy/glow sections right above footer */
  .why-section[style*="min-height:0"],
  .get-started-section[style*="min-height:0"],
  .why-section:last-of-type,
  .get-started-section:last-of-type {
    border-top: none !important;
    border-bottom: none !important;
    display: none !important;
  }

  /* 4. Remove section bottom borders right above footer on mobile (Upper Line) */
  main > section:last-of-type,
  main > div:last-of-type,
  section:last-of-type,
  .models-section,
  .faq-accordion-list,
  .dev-section,
  .tribute-section,
  .community-section,
  .jobs-grid,
  .dynamic-jd-wrapper,
  .phil2-contact-section,
  .phil-status-contact,
  .related-videos,
  .event-detail-body,
  .gallery-large,
  .event-quote,
  .event-meta,
  .md-code-tablet,
  .session-header-row {
    border-bottom: none !important;
  }


/* ════════════════════════════════════════════════
   MOBILE FOOTER OVERRIDES (<= 1024px)
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  body .footer,
  body footer.footer,
  body footer#footer,
  body footer#footer-mobile,
  .footer,
  #footer,
  #footer-mobile {
    position: relative !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    margin: 32px 0 0 0 !important;
    padding: 0 !important;
    background: #1c1414 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-sizing: border-box !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    z-index: 10 !important;
  }

  
  /* Remove section bottom border right above footer on mobile to eliminate upper line */
  main > section:last-of-type,
  main > div:last-of-type,
  section:last-of-type,
  .phil2-mobile-page-wrapper > main > section:last-of-type,
  .phil-mobile-page-wrapper > main > section:last-of-type,
  .sbox-page section:last-of-type,
  .page-section:last-of-type,
  .faq-section,
  .get-started-section,
  .community-section,
  .related-videos,
  .phil2-contact-section {
    border-bottom: none !important;
  }

  body .footer .footer-inner,
  body footer#footer-mobile .footer-inner,
  .footer-inner {
    width: calc(100% - calc(var(--px, 24px) * 2)) !important;
    max-width: var(--max-w, 1376px) !important;
    margin: 0 auto !important;
    padding: 32px 20px !important;
    box-sizing: border-box !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    height: auto !important;
  }

  /* Top Nav Row */
  body .footer .footer-nav-row,
  body footer#footer-mobile .footer-nav-row,
  .footer-nav-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 18px !important;
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body .footer .footer-nav-links,
  body footer#footer-mobile .footer-nav-links,
  .footer-nav-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body .footer .footer-nav-link,
  body footer#footer-mobile .footer-nav-link,
  .footer-nav-link {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  /* Social Icons */
  body .footer .footer-socials,
  body footer#footer-mobile .footer-socials,
  .footer-socials {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
  }

  body .footer .social-icon,
  body footer#footer-mobile .social-icon,
  .social-icon {
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  body .footer .social-icon svg path,
  body .footer .social-icon svg circle,
  body footer#footer-mobile .social-icon svg path,
  body footer#footer-mobile .social-icon svg circle,
  .social-icon svg path,
  .social-icon svg circle {
    stroke: #000000 !important;
    fill: #000000 !important;
  }

  body .footer .social-icon svg path[fill="none"],
  body footer#footer-mobile .social-icon svg path[fill="none"],
  .social-icon svg path[fill="none"] {
    fill: none !important;
  }

  /* Middle Row: Addresses & Logos */
  body .footer .footer-bottom-row,
  body footer#footer-mobile .footer-bottom-row,
  .footer-bottom-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Addresses: Left (Bengaluru) & Right (Palo Alto) */
  body .footer .footer-addresses,
  body footer#footer-mobile .footer-addresses,
  .footer-addresses {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
    order: 1 !important;
    box-sizing: border-box !important;
  }

  body .footer .footer-address:first-child,
  body footer#footer-mobile .footer-address:first-child,
  .footer-address:first-child {
    flex: 1 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  body .footer .footer-address:last-child,
  body .footer .footer-address:nth-child(2),
  body footer#footer-mobile .footer-address:last-child,
  body footer#footer-mobile .footer-address:nth-child(2),
  .footer-address:last-child,
  .footer-address:nth-child(2) {
    flex: 1 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }

  body .footer .footer-city,
  body footer#footer-mobile .footer-city,
  .footer-city {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    margin: 0 !important;
  }

  body .footer .footer-addr-text,
  body footer#footer-mobile .footer-addr-text,
  .footer-addr-text {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 11px !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
  }

  /* ZIROHLabs Logo: Below Addresses, Left Aligned */
  body .footer .footer-ziroh,
  body footer#footer-mobile .footer-ziroh,
  .footer-ziroh {
    order: 2 !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    margin-bottom: 24px !important;
    grid-column: auto !important;
    grid-row: auto !important;
    display: block !important;
    text-align: left !important;
  }

  body .footer .ziroh-logo,
  body footer#footer-mobile .ziroh-logo,
  .ziroh-logo {
    height: 28px !important;
    width: auto !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  /* Big K. Square Logo: Below ZIROHLabs Logo, Left Aligned */
  body .footer .footer-big-logo,
  body footer#footer-mobile .footer-big-logo,
  .footer-big-logo {
    order: 3 !important;
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    display: block !important;
  }

  body .footer .big-k-square,
  body footer#footer-mobile .big-k-square,
  .big-k-square {
    width: 72px !important;
    height: 72px !important;
    border-radius: 4px !important;
    display: block !important;
    margin-left: 0 !important;
  }

  /* Bottom Legal Section */
  body .footer .footer-legal,
  body footer#footer-mobile .footer-legal,
  .footer-legal {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-top: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body .footer .footer-legal-links,
  body footer#footer-mobile .footer-legal-links,
  .footer-legal-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    order: 1 !important;
    width: 100% !important;
  }

  body .footer .footer-legal-links a,
  body footer#footer-mobile .footer-legal-links a,
  .footer-legal-links a {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  body .footer .footer-copyright,
  body footer#footer-mobile .footer-copyright,
  .footer-copyright {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin: 0 !important;
    order: 2 !important;
    width: 100% !important;
    text-align: left !important;
  }
}


