/* Moodzy — legal & policy pages. Self-contained, no JS, on-brand with moodzy.club.
   Light cream editorial theme: Space Grotesk display, Instrument Sans body,
   JetBrains Mono labels, coral accent, subtle grain. Built for long-form reading. */

:root {
  --bg: #F5F2EE;
  --text: #1A1A1A;
  --text-dim: #54535C;
  --accent: #FF4D00;
  --border: #D4D0CC;
  --surface: #FFFFFF;
  --dark: #0F0F0F;
  --dark-text: #E8E5E1;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Space Grotesk', sans-serif;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.66;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; transition: opacity .2s ease; }
a:hover { opacity: .72; }
::selection { background: var(--accent); color: #fff; }

/* Grain overlay — same fractal-noise texture as the landing page */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Sticky top bar */
.legal-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 242, 238, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.legal-nav-inner {
  max-width: 860px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.legal-logo { display: flex; align-items: center; gap: 7px; color: var(--text); }
.legal-logo:hover { opacity: 1; }
.legal-logo-text { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.legal-logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.legal-back { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); display: flex; align-items: center; gap: 7px; }
.legal-back:hover { color: var(--accent); opacity: 1; }

/* Document */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 66px 24px 90px; position: relative; z-index: 2; }
.legal-tag {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); display: inline-block; margin-bottom: 22px;
}
.legal-wrap > h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 6.4vw, 54px); line-height: 1.03; letter-spacing: -.035em; margin-bottom: 20px;
}
.legal-meta { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); margin-bottom: 26px; }
.legal-meta strong { color: var(--text); font-weight: 500; }
.legal-intro { font-size: 18px; color: #232323; line-height: 1.62; max-width: 680px; margin-bottom: 36px; }
.legal-intro p { margin-bottom: 14px; }
.legal-intro p:last-child { margin-bottom: 0; }

/* Table of contents */
.legal-toc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px 26px; margin: 0 0 52px; }
.legal-toc h2 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-bottom: 16px; }
.legal-toc ol { list-style: none; columns: 2; column-gap: 34px; }
.legal-toc li { margin-bottom: 11px; break-inside: avoid; }
.legal-toc a { color: var(--text); font-size: 14.5px; display: flex; gap: 11px; align-items: baseline; }
.legal-toc a .tnum { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.legal-toc a:hover { color: var(--accent); opacity: 1; }

/* Sections */
.legal-section { margin-bottom: 46px; scroll-margin-top: 88px; }
.legal-section > h2 { font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: -.025em; line-height: 1.18; margin-bottom: 16px; display: flex; gap: 13px; align-items: baseline; }
.legal-section > h2 .num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent); flex-shrink: 0; }
.legal-section h3 { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; margin: 26px 0 10px; }
.legal-section p { margin-bottom: 14px; color: #222222; }
.legal-section ul, .legal-section ol.legal-list { margin: 0 0 16px; padding-left: 22px; }
.legal-section li { margin-bottom: 9px; color: #222222; }
.legal-section li::marker { color: var(--accent); }
.legal-section strong { font-weight: 600; color: var(--text); }
.legal-section a { font-weight: 500; }

/* Callout */
.legal-callout { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 22px 0; box-shadow: 0 1px 0 var(--border); }
.legal-callout .ttl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin-bottom: 9px; display: block; }
.legal-callout p:last-child { margin-bottom: 0; }

/* Contact card — light & high-contrast, with an accent edge */
.legal-contact { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); padding: 24px 28px; margin: 26px 0; }
.legal-contact h3 { font-family: var(--display); color: var(--text); font-size: 18px; margin: 0 0 12px; }
.legal-contact .row { margin-bottom: 7px; font-size: 14.5px; color: #222222; }
.legal-contact .row strong { color: var(--text); font-weight: 600; }
.legal-contact a { color: var(--accent); }

/* Footer */
.legal-foot { border-top: 1px solid var(--border); max-width: 760px; margin: 0 auto; padding: 38px 24px 64px; position: relative; z-index: 2; }
.legal-foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.legal-foot-links a { font-size: 13.5px; color: var(--text-dim); }
.legal-foot-links a:hover { color: var(--accent); opacity: 1; }
.legal-foot-copy { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); line-height: 1.7; }

@media (max-width: 640px) {
  .legal-toc ol { columns: 1; }
  .legal-wrap { padding: 46px 20px 72px; }
  .legal-wrap > h1 { letter-spacing: -.03em; }
}
