/* ==========================================================================
   Grover Automation LLC — shared legal stylesheet (privacy + terms)
   Light theme · cream background · dark text
   ========================================================================== */

:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #3A3A3A;
  --ink-muted: #5A5955;
  --line: #E3DFD6;
  --accent: #2563EB;
  --accent-strong: #1D4ED8;
  --accent-soft: #3B82F6;
  --accent-tint: #E8EEFC;
  --on-accent: #FFFFFF;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
}

/* Scope-isolation: legal pages never inherit homepage section styling */
.legal-page {
  background-color: var(--bg);
  color: var(--ink);
}

.legal-page .legal-content section {
  background-color: transparent !important;
  border: none !important;
}

.legal-page .legal-content article {
  background-color: transparent !important;
}

/* ==========================================================================
   Legal page header (a <header> element, solid/gradient background)
   ========================================================================== */

.legal-header {
  background: linear-gradient(120deg, #1A1A1A 0%, #1F2A44 55%, #24437A 100%);
  padding: 84px 24px 64px;
  text-align: center;
  border-bottom: 1px solid #2A2A33;
}

.legal-header .legal-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-header .kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93C5FD;
  margin-bottom: 16px;
}

.legal-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.legal-header .updated {
  margin-top: 18px;
  font-size: 0.95rem;
  color: #C7CBD1;
}

.legal-header .updated strong {
  color: #FFFFFF;
}

/* ==========================================================================
   Breadcrumb / back link
   ========================================================================== */

.legal-topbar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
}

.legal-topbar-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.back-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--accent-strong);
}

.brand-mini {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.brand-mini span {
  color: var(--accent);
}

/* ==========================================================================
   Legal content layout
   ========================================================================== */

.legal-content {
  padding: 48px 0 72px;
}

.legal-content .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Table of contents
   ========================================================================== */

.toc {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 28px 28px 22px;
  margin-bottom: 48px;
}

.toc h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  counter-increment: toc;
  margin-bottom: 10px;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
  font-size: 0.82rem;
}

.toc a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Section headings & body text
   ========================================================================== */

.legal-content section {
  margin-bottom: 48px;
  padding-top: 8px;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--accent-tint);
}

.legal-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 26px 0 10px;
}

.legal-content p {
  color: var(--ink-soft);
  margin-bottom: 18px;
  font-size: 1rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 20px 24px;
  color: var(--ink-soft);
}

.legal-content li {
  margin-bottom: 10px;
}

.legal-content strong {
  color: var(--ink);
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-strong);
}

/* ==========================================================================
   Callout box
   ========================================================================== */

.legal-note {
  background-color: var(--accent-tint);
  border: 1px solid #D6E1FA;
  border-radius: 12px;
  padding: 22px 24px;
  margin: 24px 0;
}

.legal-note p {
  margin-bottom: 0;
  color: var(--ink);
}

.legal-note strong {
  color: var(--accent-strong);
}

/* ==========================================================================
   Contact block
   ========================================================================== */

.legal-contact {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 28px;
}

.legal-contact p {
  margin-bottom: 8px;
}

.legal-contact p:last-child {
  margin-bottom: 0;
}

.legal-contact a {
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.legal-footer {
  background-color: #1A1A1A;
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid #2A2A33;
}

.legal-footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

.legal-footer .footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #F7F5F0;
  display: inline-block;
  margin-bottom: 14px;
}

.legal-footer .footer-logo span {
  color: var(--accent-soft);
}

.legal-footer .footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 16px;
}

.legal-footer .footer-nav a {
  color: #9CA3AF;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.legal-footer .footer-nav a:hover {
  color: #93C5FD;
}

.legal-footer p {
  color: #6B7280;
  font-size: 0.88rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }

  .legal-content {
    padding: 32px 0 48px;
  }
}
