/* Legal / prose pages — adds article body styling on top of the site's existing
   top bar (.top-bar) and dark footer (.tr-footer) styles from sections.css. */

/* Local color tokens (sections.css uses --ink: #2B120A which is too brown for
   long-form prose; we use a slightly more neutral ink here). */
:root {
  --legal-paper: #F5F0E6;
  --legal-ink: #1a1612;
  --legal-ink-soft: #2C2C2C;
  --legal-muted: #6b6660;
  --legal-rule: #d8d2c4;
  --legal-accent: #c8f520;
  --legal-summary-bg: #d8eedb;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--legal-paper);
  color: var(--legal-ink);
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

* { box-sizing: border-box; }

/* Top bar — copied from index.html inline styles so legal pages match the
   homepage chrome without depending on the homepage's inline <style> block. */
.top-bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}

.top-bar-logo { height: 32px; width: auto; }

.top-bar-links { display: flex; gap: 12px; }

.top-bar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #2C2C2C;
  padding: 6px 24px;
  border-radius: 14px;
  background: rgba(44, 44, 44, 0.06);
  border: 1px solid rgba(44, 44, 44, 0.12);
  transition: background 0.2s, transform 0.2s;
}

.top-bar a:hover {
  background: rgba(44, 44, 44, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .top-bar { padding: 14px 18px; }
  .top-bar-logo { height: 28px; }
  .top-bar a { font-size: 13px; padding: 6px 16px; letter-spacing: 0.5px; }
}

/* Logo as clickable home link — same visual as plain img but no button styling */
.top-bar-logo-link {
  display: inline-flex;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
}
.top-bar-logo-link:hover { background: none !important; transform: none !important; }

/* Coming Soon wiggle + tooltip — matches index.html */
[data-coming-soon] { position: relative; }
[data-coming-soon].is-wiggling { animation: trWiggle 0.5s ease-in-out; }
@keyframes trWiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-4px) rotate(-1.5deg); }
  30% { transform: translateX(4px) rotate(1.5deg); }
  45% { transform: translateX(-3px) rotate(-1deg); }
  60% { transform: translateX(3px) rotate(1deg); }
  75% { transform: translateX(-1px) rotate(-0.5deg); }
}
.tr-coming-soon-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #1a1a1a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.tr-coming-soon-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a1a1a;
}
.tr-coming-soon-tip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.top-bar .tr-coming-soon-tip {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
.top-bar .tr-coming-soon-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #1a1a1a;
}
.top-bar .tr-coming-soon-tip.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* Article body — the only "new" thing legal pages need. */
.legal-article {
  max-width: 760px;
  margin: 24px auto 96px;
  padding: 0 24px;
  line-height: 1.65;
  color: var(--legal-ink);
}

.legal-article a {
  color: var(--legal-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.legal-article a:hover {
  color: var(--legal-ink-soft);
  text-decoration-color: var(--legal-accent);
}

.legal-article h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 16px 0 8px;
  color: var(--legal-ink);
}

.legal-article .legal-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--legal-muted);
  margin-bottom: 32px;
}

.legal-article h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 48px 0 12px;
  color: var(--legal-ink);
}

.legal-article h3 {
  font-weight: 700;
  font-size: 18px;
  margin: 28px 0 8px;
  color: var(--legal-ink);
}

.legal-article p { font-size: 16.5px; margin: 0 0 16px; }

.legal-article ul, .legal-article ol {
  font-size: 16.5px;
  margin: 0 0 16px 1.25em;
  padding: 0;
}

.legal-article li { margin: 0 0 8px; }
.legal-article li > p { margin: 0 0 6px; }
.legal-article strong { font-weight: 700; }

.legal-article hr {
  border: none;
  border-top: 1px solid var(--legal-rule);
  margin: 36px 0;
}

/* Plain-language summary callout */
.legal-summary {
  background: var(--legal-summary-bg);
  border: 1.5px solid var(--legal-ink);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 28px 0 36px;
}

.legal-summary__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--legal-ink);
  margin: 0 0 10px;
}

.legal-summary p,
.legal-summary li { font-size: 15.5px; line-height: 1.55; }
.legal-summary p:last-child { margin-bottom: 0; }

/* Tables */
.legal-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 14.5px;
}

.legal-article th,
.legal-article td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--legal-rule);
}

.legal-article th {
  background: rgba(26, 22, 18, 0.04);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Inline code (e.g., field names) */
.legal-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: rgba(26, 22, 18, 0.06);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Blockquote — used for "flagged for lawyer review" callouts */
.legal-article blockquote {
  border-left: 3px solid var(--legal-accent);
  background: rgba(200, 245, 32, 0.08);
  margin: 18px 0;
  padding: 12px 18px;
  font-size: 15px;
  color: var(--legal-ink-soft);
  border-radius: 0 8px 8px 0;
}

.legal-article blockquote p { margin: 0; }

/* All-caps "as-is" / "limitation of liability" disclaimer paragraphs */
.legal-article p.legal-uppercase {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  line-height: 1.55;
  color: var(--legal-ink-soft);
}

@media (max-width: 600px) {
  .legal-article { margin: 16px auto 64px; padding: 0 18px; }
  .legal-article h1 { font-size: 38px; }
  .legal-article h2 { font-size: 22px; margin-top: 40px; }
  .legal-article p, .legal-article ul, .legal-article ol { font-size: 16px; }
  .legal-article table { font-size: 13.5px; }
  .legal-article th, .legal-article td { padding: 8px 10px; }
}
