/* SleepQ — shared styling for legal/support pages.
   Matches the brand system used in index.html (dark theme, DM Serif Display + DM Sans). */

:root {
  --bg: #0b1b24;
  --bg-2: #0f262d;
  --surface: #174357;
  --surface-2: #476470;
  --text: #ffffff;
  --muted: #bee2e0;
  --accent: #5baea8;
  --teal-soft: #86bfb8;
  --body: #d7e7e9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; }
a { color: var(--teal-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal-soft); outline-offset: 3px; border-radius: 4px; }
.serif { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; }

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 27, 36, .82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.site-nav-container {
  max-width: 1120px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 9px; display: block; object-fit: cover;
}
.brand-name { font-family: "DM Serif Display", Georgia, serif; font-size: 24px; color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--muted); font-weight: 600; font-size: 16px; text-decoration: none; }
.nav-link:hover { color: var(--text); text-decoration: none; }

/* Layout */
main { flex: 1; width: 100%; }
.page-wrapper { max-width: 820px; margin: 0 auto; padding: 0 32px; }
.page-header {
  padding: 72px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 48px;
}
.page-header h1 {
  font-family: "DM Serif Display", Georgia, serif; font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.08;
  margin: 0 0 14px;
}
.page-header p { color: var(--muted); font-size: 15px; font-weight: 500; margin: 0; }

/* Legal / support content */
.content.legal { color: var(--body); font-size: 17px; padding-bottom: 96px; }
.content.legal h2 {
  font-family: "DM Serif Display", Georgia, serif; font-weight: 400; color: var(--text);
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2;
  margin: 52px 0 16px;
}
.content.legal h3 {
  font-family: "DM Sans", sans-serif; font-weight: 600; color: var(--text);
  font-size: 18px; margin: 30px 0 10px;
}
.content.legal p { margin: 0 0 16px; }
.content.legal ul, .content.legal ol { margin: 0 0 18px; padding-left: 24px; }
.content.legal li { margin: 0 0 8px; }
.content.legal li::marker { color: var(--accent); }
.content.legal a { color: var(--teal-soft); word-break: break-word; }
.content.legal strong { color: var(--text); font-weight: 700; }

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 40px 32px;
}
.footer-container {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 640px) {
  .site-nav-container { padding: 14px 20px; }
  .nav-right { gap: 18px; }
  .nav-link { font-size: 15px; }
  .brand-name { font-size: 22px; }
  .page-wrapper { padding: 0 20px; }
  .page-header { padding: 48px 0 28px; margin-bottom: 36px; }
  .content.legal { font-size: 16px; }
  .footer-container { flex-direction: column; align-items: flex-start; }
}
