/* ============================================================
   ShiftBee — shared styling for legal pages (privacy / terms).
   Same design language as the marketing site: near-white canvas,
   slate ink, honey accent. RTL-first, logical properties only.
   ============================================================ */
:root {
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --ink: #191b22;
  --body: #454a56;
  /* Darkened from #767c8b (3.93:1 — failed WCAG 1.4.3 AA) to 5.1:1.
     The extra headroom over 4.5:1 is deliberate: Hebrew faces render
     thinner than Latin at the same size. */
  --muted: #646a78;
  --line: #ecedf1;
  --line-strong: #dfe1e8;
  --gold: #f5b724;
  --gold-ink: #8a5c08;
  --espresso: #14151a;
  --on-dark: #f4f5f8;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--body);
  font: 400 17px/1.75 'Heebo', system-ui, -apple-system, sans-serif;
  /* No -webkit-font-smoothing / text-rendering here either - see the note on
     `body` in styles.css. Both are banned by the app's typography spec. */
}

/* dark header band, echoes the site's espresso bookends */
.legal-top {
  background: var(--espresso);
  border-block-end: 3px solid var(--gold);
}

.legal-top__inner {
  max-width: 760px;
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--on-dark);
}

.legal-brand img { inline-size: 28px; block-size: 28px; display: block; }

/* 1.3 is stated, not inherited: the `font:` shorthand resets line-height to
   `normal` (~1.2), a Latin display value that crushes Hebrew. */
.legal-brand b {
  font: 800 19px/1.3 'Heebo', system-ui, sans-serif;
}

/* Same gate as .brand__word in styles.css: the wordmark happens to be Latin,
   but the declaration itself applied on the Hebrew legal pages. */
:lang(en) .legal-brand b {
  letter-spacing: -0.01em;
}

.legal-brand b span { color: var(--gold); }

.legal-top__spacer { flex: 1; }

.legal-top a.legal-lang {
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid rgba(244, 245, 248, 0.22);
  border-radius: 999px;
  padding: 5px 14px;
}

main.legal {
  max-width: 760px;
  margin-inline: auto;
  padding: 44px 24px 96px;
}

.legal h1 {
  /* 1.25, up from 1.18. These pages are Hebrew; 1.18 is below even the ~1.2
     Latin default and matches the --lh-display floor set in styles.css. */
  font: 800 clamp(30px, 5vw, 38px)/1.25 'Heebo', system-ui, sans-serif;
  color: var(--ink);
  margin-block: 8px 6px;
}

.legal h2 {
  font: 700 clamp(19px, 2.6vw, 22px)/1.35 'Heebo', system-ui, sans-serif;
  color: var(--ink);
  margin-block: 40px 12px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--line);
}

.legal h2:first-of-type { border-block-start: 0; padding-block-start: 0; margin-block-start: 34px; }

.legal p, .legal li { color: var(--body); max-width: 66ch; }
.legal p + p { margin-block-start: 12px; }

.legal ul { padding-inline-start: 20px; margin-block: 12px; display: grid; gap: 8px; }
.legal li { padding-inline-start: 4px; }
.legal li::marker { color: var(--gold-ink); }

.legal strong { color: var(--ink); font-weight: 700; }

.legal a { color: var(--gold-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--ink); }

.legal .meta {
  font-size: 0.92rem;
  color: var(--muted);
  margin-block-end: 28px;
}

/* The intro box used a 3px gold border on its start edge. That side-stripe
   encodes nothing - unlike the one on .pshift in styles.css, which carries the
   shift's ROLE - so it was decoration in the shape of a data marker. A gold
   tint over the whole surface says "this paragraph is the summary" without
   borrowing the vocabulary of a category indicator. */
.legal .intro {
  font-size: 1.08rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--gold) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: var(--radius);
  padding: 18px 20px;
}

.legal .lede { max-width: 66ch; }

.legal .toc {
  margin-block: 24px 8px;
  padding: 4px 0;
  font-size: 0.96rem;
}

/* keep emails/numbers LTR inside RTL text */
.legal bdi, .legal .ltr { direction: ltr; unicode-bidi: isolate; }

footer.legal-foot {
  border-block-start: 1px solid var(--line);
  margin-block-start: 56px;
  padding-block-start: 22px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.92rem;
}

footer.legal-foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
footer.legal-foot a:hover { color: var(--ink); }
footer.legal-foot .legal-foot__spacer { flex: 1; }
footer.legal-foot span { color: var(--muted); }
