/* ==========================================================================
   HostRyze — legal pages (privacy.html, terms.html).
   Loads after css/styles.css and css/pages.css and only adds what those lack:
   the "last updated" meta line in the hero, the two-column layout with a sticky
   "On this page" index, numbered prose blocks, the email call-to-action and print.
   Two colours only; every rule reads the surface's --fg / --fgc.
   ========================================================================== */

/* ---------- Hero meta ("Last updated …") ---------- */
.legal__meta { display: inline-flex; align-items: center; gap: 10px; margin-top: clamp(20px, 3.4vh, 30px); font-size: 0.9rem; font-weight: 600; color: rgba(var(--fgc), 0.72); }
.legal__meta::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.6; }

/* ---------- Layout: index left, prose right ---------- */
.legal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.legal__prose { counter-reset: legal; }

/* ---------- "On this page" index ---------- */
.legal__toc { position: sticky; top: calc(var(--nav-h) + 32px); }
.legal__toc > p { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(var(--fgc), 0.62); margin-bottom: 12px; }
.legal__toc ol { counter-reset: toc; border-top: 1.5px solid var(--fg); }
.legal__toc li { counter-increment: toc; border-bottom: 1px solid rgba(var(--fgc), 0.2); }
.legal__toc a { display: flex; align-items: baseline; gap: 14px; padding: 11px 0; font-size: 0.95rem; font-weight: 600; text-decoration: none; line-height: 1.3; }
.legal__toc a::before { content: counter(toc, decimal-leading-zero); flex: none; font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(var(--fgc), 0.5); }
.legal__toc a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Numbered prose blocks ---------- */
.legal__block { counter-increment: legal; }
.legal__block + .legal__block { margin-top: clamp(32px, 5vh, 52px); padding-top: clamp(28px, 4vh, 40px); border-top: 1px solid rgba(var(--fgc), 0.2); }
.legal .prose h2 { margin: 0 0 14px; display: flex; align-items: baseline; gap: 16px; }
.legal .prose h2::before { content: counter(legal, decimal-leading-zero); flex: none; font-size: 0.78em; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; color: rgba(var(--fgc), 0.42); }
.legal .prose p { max-width: 66ch; }
.legal .prose li { max-width: 62ch; }
.legal .prose p:last-child, .legal .prose ul:last-child { margin-bottom: 0; }
.legal__block:target { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ---------- Email call-to-action ---------- */
.legal__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.legal__cta span { font-size: 0.95rem; font-weight: 600; color: rgba(var(--fgc), 0.72); }

/* ---------- "Also read" line ---------- */
.legal__also { margin-top: clamp(36px, 6vh, 56px); padding-top: 20px; border-top: 1.5px solid var(--fg); font-size: 0.95rem; font-weight: 600; color: rgba(var(--fgc), 0.72); }
.legal__also a { color: var(--fg); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 32px; }
  .legal__toc { position: static; }
  .legal__toc ol { display: flex; flex-wrap: wrap; gap: 8px; border-top: 0; }
  .legal__toc li { border-bottom: 0; }
  .legal__toc a { padding: 8px 14px; border: 1.5px solid rgba(var(--fgc), 0.35); border-radius: 999px; font-size: 0.9rem; }
  .legal__toc a::before { display: none; }
  .legal__toc a:hover { text-decoration: none; border-color: var(--fg); }
}
@media (max-width: 640px) {
  .legal__block + .legal__block { margin-top: 28px; padding-top: 24px; }
  .legal .prose h2 { gap: 12px; }
  .legal__cta .btn { width: 100%; }
}

/* ---------- Print: just the text ---------- */
@media print {
  .preloader, .nav, .footer, .modal, .totop, .skip, .legal__toc, .legal__also { display: none !important; }
  .phero, .sec { padding-block: 0 24px; }
  .phero.green { background: none; color: var(--green); }
  .legal { grid-template-columns: 1fr; }
  .js .reveal { opacity: 1; transform: none; }
  a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-weight: 400; }
  .legal__cta .btn { display: none; }
}
