/* Artly — legal pages (landing, Privacy Policy & Terms of Use)
   Shared stylesheet. Palette mirrors the iOS app (AppTheme.swift).

   Fonts are self-hosted on purpose: a privacy policy that pulls webfonts from a
   Google CDN hands the reader's IP to Google just to render the page saying it
   respects their data. Arbutus Slab is the same file the app ships
   (Resources/Fonts) and everything else rides the system stack, which is SF on
   the devices this page is actually opened from. */

@font-face {
  font-family: 'Arbutus Slab';
  src: url('fonts/ArbutusSlab-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #FAFBFF;
  --card: #FFFFFF;
  --ink: #101828;
  --muted: #5A6B85;
  --faint: #8B97AC;
  --line: #ECEEF3;
  --tint: #F4F0FF;
  --brand-1: #7041EE;
  --brand-2: #8D41EE;
  --brand-3: #D641EE;
  --accent: #8D41EE;
  --body: #26324A;
  --brand: linear-gradient(120deg, #7041EE 0%, #8D41EE 45%, #D641EE 100%);
  --shadow: 0 18px 50px -24px rgba(112, 65, 238, 0.35);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, Roboto, sans-serif;
  --display: 'Arbutus Slab', Georgia, 'Times New Roman', serif;
  --mono: 'SF Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px clamp(20px, 5vw, 40px);
  background: rgba(250, 251, 255, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.mark {
  width: 26px; height: 26px; border-radius: 8px;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow);
  flex: none;
}
.topbar a.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.topbar .doc-kind {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Shell ---------- */
.shell {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 72px) clamp(20px, 5vw, 40px) 96px;
}

/* ---------- Hero ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
h1 .grad {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(17px, 2.6vw, 19px);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 28px;
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted);
}
.meta b { color: var(--ink); font-weight: 600; }
.meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); }

/* ---------- Table of contents ---------- */
.toc {
  margin: 40px 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toc a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  transition: border-color .15s, color .15s, background .15s;
}
.toc a:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--tint); }

/* ---------- Sections ---------- */
.rule {
  height: 1px;
  border: 0;
  margin: 44px 0;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-3) 60%, transparent);
  opacity: 0.35;
}
section { scroll-margin-top: 80px; }
section > .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.1em;
}
h2 {
  font-weight: 700;
  font-size: clamp(21px, 4vw, 26px);
  letter-spacing: -0.02em;
  margin: 6px 0 14px;
}
h3 {
  font-weight: 600;
  font-size: 17px;
  margin: 26px 0 8px;
}
p { margin: 0 0 16px; color: var(--body); }
ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--body);
}
li::before {
  content: "";
  position: absolute;
  left: 6px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--brand);
}
a { color: var(--accent); }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Callout ---------- */
.note {
  margin: 22px 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
}
.note p:last-child, .note ul:last-child, .note li:last-child { margin-bottom: 0; }
.note .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

/* ---------- Landing cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.cards li { padding-left: 0; margin: 0; }
.cards li::before { content: none; }
.cards a {
  display: block;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cards a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cards b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}
.cards span { font-size: 14px; color: var(--muted); }

/* ---------- Contact card ---------- */
.contact {
  margin-top: 44px;
  padding: 26px;
  border-radius: 18px;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow);
}
.contact h2 { color: #fff; margin-top: 0; }
.contact p { color: rgba(255, 255, 255, 0.9); }
.contact a { color: #fff; font-weight: 600; }
.contact > .num { color: rgba(255, 255, 255, 0.6); }

/* ---------- Footer ---------- */
footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 40px) 56px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  font-size: 13px;
  color: var(--faint);
}
footer nav { margin-left: auto; display: flex; gap: 18px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0E15;
    --card: #151824;
    --ink: #F3F5FB;
    --muted: #A6B0C4;
    --faint: #6B7690;
    --line: #232838;
    --tint: #1A1630;
    --body: #C4CCDC;
    --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
  }
  .topbar { background: rgba(12, 14, 21, 0.82); }
}

/* ---------- Forced colors ---------- */
/* The hero word is painted by clipping a gradient to transparent text, which in
   forced-colors mode leaves nothing to read. Hand it back a real colour. */
@media (forced-colors: active) {
  h1 .grad {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: currentColor;
  }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cards a:hover { transform: none; }
}
