/* ═══════════════════════════════════════════════════════════
   LEGIT ROBOTICS — LEGAL PAGES
   Reuses the hub design system (legal-base.css) + page-specific styles
   ═══════════════════════════════════════════════════════════ */

@import url('legal-base.css');

/* Keep the navbar logo clickable like the hub (it links back to ../) */
.navbar .nav-logo { cursor: pointer; }

/* Back-to-home button in the navbar */
.nav-back {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #4b4b4b;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-back:hover {
  color: #000;
  border-color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

/* ═══════════════ HERO (short) ═══════════════ */
.legal-hero {
  background: var(--bg-dark);
  color: #fff;
  margin-top: var(--nav-height);
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent);
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
}

.legal-hero .container { position: relative; z-index: 2; }

.legal-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 7px 16px;
  border: 1px solid rgba(77, 163, 255, 0.3);
  background: rgba(26, 115, 232, 0.08);
}

.legal-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 14px;
}

.legal-hero-updated {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

.legal-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 640px;
  line-height: 1.7;
  margin-top: 18px;
}

/* ═══════════════ DISCLAIMER BANNER ═══════════════ */
/* Sits inside the dark hero, so it uses light text on a translucent panel. */
.legal-disclaimer {
  background: rgba(26, 115, 232, 0.12);
  border: 1px solid rgba(77, 163, 255, 0.35);
  border-left: 4px solid var(--accent-light);
  padding: 14px 20px;
  margin: 40px 0 0;
  max-width: 640px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-sm);
}

/* ═══════════════ LAYOUT: content + optional sticky TOC ═══════════════ */
.legal-layout {
  padding: 56px 0 96px;
  background: var(--bg-primary);
}

.legal-layout .container {
  display: grid;
  grid-template-columns: 230px minmax(0, 800px);
  gap: 56px;
  align-items: start;
  justify-content: center;
}

/* Table of contents (sticky on desktop) */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  align-self: start;
}

.legal-toc-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.legal-toc nav { display: flex; flex-direction: column; }

.legal-toc a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 7px 0 7px 14px;
  border-left: 2px solid var(--border);
  line-height: 1.4;
  transition: var(--transition-fast);
}

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

/* ═══════════════ CONTENT TYPOGRAPHY ═══════════════ */
.legal-content {
  max-width: 800px;
  font-size: 1rem;
  color: var(--text-primary);
}

.legal-content section { scroll-margin-top: calc(var(--nav-height) + 24px); }

.legal-content section + section {
  margin-top: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--border);
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.legal-content p {
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: none;
  margin: 4px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-content ul li {
  position: relative;
  padding-left: 22px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.legal-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(26, 115, 232, 0.3);
  transition: var(--transition-fast);
  overflow-wrap: anywhere;
}

.legal-content a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep);
}

/* Identity / definition table (used in Mentions légales) */
.legal-identity {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 8px 0 24px;
}

.legal-identity dt {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.legal-identity dd {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.legal-identity dt:last-of-type,
.legal-identity dd:last-of-type { border-bottom: none; }

/* Visible placeholder chip for client-supplied values */
.legal-placeholder {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: rgba(26, 115, 232, 0.1);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

/* ═══════════════ FOOTER (simplified) ═══════════════ */
.legal-footer {
  background: #0a0a0a;
  color: #fff;
  padding: 48px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.legal-footer-logo img { height: 34px; width: auto; }

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.legal-footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition-fast);
}

.legal-footer-links a:hover { color: var(--accent-light); }
.legal-footer-links a[aria-current="page"] { color: #fff; font-weight: 600; }

.legal-footer-copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  width: 100%;
  max-width: 800px;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 980px) {
  .legal-layout .container {
    grid-template-columns: minmax(0, 800px);
    gap: 0;
  }

  /* Collapse the sticky sidebar into an inline, non-sticky TOC card */
  .legal-toc {
    position: static;
    margin-bottom: 40px;
    padding: 20px 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  .legal-toc nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
  }

  .legal-toc a { border-left: none; padding-left: 0; }
  .legal-toc a:hover { border-left: none; }
}

@media (max-width: 600px) {
  .legal-hero { padding: 64px 0 48px; }

  .legal-identity {
    grid-template-columns: 1fr;
  }

  .legal-identity dt {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .legal-identity dd:not(:last-of-type) { border-bottom: 1px solid var(--border); }

  .legal-toc nav { grid-template-columns: 1fr; }
}
