/* Tiferet Rooms — privacy policy and terms. A plain reading page on black: parchment text,
   gold grains drifting over the title, gold only for numbers, markers and what is current. Large type, short
   lines, logical properties (Hebrew mirrors), no shadows, no frames, no boxes in boxes. */

:root {
  --ink: #050505;
  --parchment: #f7f1e3;
  --parchment-dim: rgba(247, 241, 227, 0.78);
  --parchment-mute: rgba(247, 241, 227, 0.52);
  --gold: #ffc44d;
  --gold-ink: #1a1408;
  --line: rgba(247, 241, 227, 0.14);
  --font: "Roboto Condensed", "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--parchment-dim);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--parchment); text-decoration: underline; text-decoration-color: rgba(255, 196, 77, 0.5); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }

/* ---------- Top bar: back to the landing, languages ---------- */

.legal-nav {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px;
  background: rgba(5, 5, 5, 0.78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.legal-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--parchment); font-weight: 800; font-size: 1.15rem; }
.legal-brand img { width: 40px; height: 40px; border-radius: 10px; }
.legal-brand i { font-style: normal; color: var(--gold); }

.legal-langs { display: flex; gap: 2px; padding: 3px; border-radius: 19px; background: var(--gold); }
.legal-langs a {
  min-width: 40px; height: 34px; padding-inline: 8px; display: grid; place-items: center; border-radius: 16px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-decoration: none; color: rgba(26, 20, 8, 0.55);
}
.legal-langs a:hover { color: var(--gold-ink); }
.legal-langs a.is-on { color: var(--gold-ink); background: rgba(255, 246, 221, 0.55); }

/* ---------- The document ---------- */

.legal { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(40px, 9vh, 96px) var(--gutter) 48px; counter-reset: part; }

/* The title's sky: warm light and drifting grains, fading into the black before the text */
.legal-sky { position: absolute; inset: 0 0 auto; height: clamp(420px, 62vh, 620px); overflow: hidden; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 70% at 50% 18%, rgba(255, 196, 77, 0.13), rgba(230, 170, 66, 0.04) 55%, transparent 80%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.legal-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
body { position: relative; isolation: isolate; }
.legal__kicker { margin: 0 0 8px; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.legal h1 { margin: 0; font-size: clamp(2.4rem, 6.4vw, 3.8rem); line-height: 1.06; font-weight: 800; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fffaf0 0%, var(--parchment) 45%, #ffe3a3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.legal__updated { margin: 12px 0 0; font-size: 0.95rem; color: var(--parchment-mute); }

.legal__lead { margin: 28px 0 0; font-size: 1.25rem; line-height: 1.6; color: var(--parchment); }

.legal__toc { position: relative; margin: 36px 0 0; padding-block: 22px; border-bottom: 1px solid var(--line); }
.legal__toc::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 196, 77, 0.7) 30%, rgba(255, 196, 77, 0.7) 70%, transparent); }
.legal__toc p { margin: 0 0 10px; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--parchment-mute); }
.legal__toc ol { margin: 0; padding-inline-start: 1.4em; columns: 2 280px; column-gap: 32px; }
.legal__toc li { break-inside: avoid; padding-block: 3px; color: var(--parchment-mute); }
.legal__toc a { text-decoration: none; color: var(--parchment-dim); }
.legal__toc a:hover { color: var(--gold); }

.legal section { margin-top: 52px; counter-increment: part; }
.legal section > h2::before { content: counter(part, decimal-leading-zero); display: block; margin-bottom: 6px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.16em; color: var(--gold); }
.legal h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 1.65rem); line-height: 1.25; font-weight: 800; color: var(--parchment); }
.legal h3 { margin: 22px 0 8px; font-size: 1.15rem; font-weight: 700; color: var(--parchment); }
.legal p { margin: 0 0 14px; }
.legal section ul, .legal section ol { margin: 0 0 14px; padding-inline-start: 1.3em; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--gold); }
.legal strong { color: var(--parchment); font-weight: 700; }

/* A short summary in plain words before a section's details. */
.legal .legal__short { color: var(--parchment); }

.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 1rem; }
.legal th, .legal td { text-align: start; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.legal th { color: var(--parchment); font-weight: 700; }
@media (max-width: 600px) {
  .legal table, .legal tbody, .legal tr, .legal td, .legal th { display: block; width: 100%; }
  .legal thead { display: none; }
  .legal tr { padding-block: 8px; border-bottom: 1px solid var(--line); }
  .legal td { border: 0; padding: 2px 0; }
  .legal td:first-child { color: var(--parchment); font-weight: 700; }
}

/* ---------- Footer ---------- */

.legal-foot { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--parchment-mute); font-size: 0.95rem; text-align: center; }
.legal-foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-bottom: 12px; }
.legal-foot__links a { text-decoration: none; color: var(--parchment-dim); }
.legal-foot__links a[aria-current="page"] { color: var(--gold); }
.legal-foot p { margin: 0; }

/* Hebrew has no capitals: tracking only spreads the letters apart */
[dir="rtl"] .legal__toc p { letter-spacing: 0; text-transform: none; }
