/* Sleepfy legal pages.
   Georgia for reading, system sans for furniture (nav, meta, footer).
   Theme-aware: the app is dark-only, but these pages get opened in daylight
   from an App Store listing, so they follow the reader's system setting. */

:root {
  color-scheme: light dark;

  --bg: #0a0f1c;
  --bg-soft: #0d1424;
  --card: #101828;
  --text: #f2f5fa;
  --text-soft: rgba(242, 245, 250, 0.76);
  --text-muted: rgba(242, 245, 250, 0.5);
  --accent: #6ea8ff;
  --border: rgba(255, 255, 255, 0.09);
  --rule: rgba(255, 255, 255, 0.06);

  /* Times New Roman for titles, Georgia for reading. Times has a small x-height
     and fine strokes, so it needs bold weight, tight tracking and real size to
     work at display scale — set that way it reads classic rather than default.
     Georgia carries the body: drawn for screens, and sturdier at 17px. */
  --display: "Times New Roman", Times, serif;
  --serif: Georgia, "Iowan Old Style", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfaf7;          /* warm off-white — stark #fff is harsh for long reading */
    --bg-soft: #f4f2ed;
    --card: #ffffff;
    --text: #15181f;
    --text-soft: rgba(21, 24, 31, 0.82);
    --text-muted: rgba(21, 24, 31, 0.55);
    --accent: #1d5fd0;
    --border: rgba(21, 24, 31, 0.12);
    --rule: rgba(21, 24, 31, 0.08);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 660px;          /* ~70 characters at this size — the readable measure */
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* ---- Header ---- */

header.site {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

header.site .moon {
  font-size: 38px;
  line-height: 1;
}

header.site h1 {
  font-family: var(--display);
  font-size: 40px;          /* larger than the Georgia equivalent — Times runs small */
  line-height: 1.15;
  margin: 16px 0 10px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

header.site p.updated {
  font-family: var(--sans);
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.01em;
  margin: 0;
}

/* ---- Type ---- */

h2 {
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.3;
  margin: 44px 0 14px;
  letter-spacing: -0.015em;
  font-weight: 700;
}

/* Support page uses h2.faq for questions. Kept close to body size so the page
   doesn't read as a wall of headings — the font change carries the hierarchy. */
h2.faq {
  font-size: 21px;
  margin: 36px 0 10px;
  color: var(--text);
}

p, li {
  color: var(--text-soft);
  font-size: 17px;
}

p { margin: 0 0 16px; }

strong { color: var(--text); font-weight: 700; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: currentColor;
}

ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

li { margin: 8px 0; }

/* ---- Cards ---- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 24px 0;
}

.card p { margin: 8px 0; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* ---- Furniture ---- */

nav.back {
  font-family: var(--sans);
  font-size: 14px;
  margin-bottom: 28px;
}

nav.back a { color: var(--text-muted); }
nav.back a:hover { color: var(--accent); }

footer {
  font-family: var(--sans);
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

/* ---- Index page ---- */

.index-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 32px;
}

.index-links a {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.index-links a span {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.index-links a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .index-links a { transition: none; }
  .index-links a:hover { transform: none; }
}

/* ---- Small screens ---- */

@media (max-width: 480px) {
  main { padding: 32px 20px 72px; }
  header.site h1 { font-size: 32px; }
  h2 { font-size: 22px; margin-top: 36px; }
  h2.faq { font-size: 19px; }
  .index-links a { font-size: 20px; }
  p, li { font-size: 16px; }
}
