/*
  Solace Hosting — shared stylesheet for all policy pages
  Self-contained, no external CDN, system-font stack only.
  Looks fine on every device, loads instantly, no privacy concerns
  (since this site IS the privacy policy — using a Google-Fonts CDN
  here would be ironic).
*/

:root {
  --bg: #0F0A1E;
  --bg-card: #1A0F2E;
  --bg-elevated: #251841;
  --text: #F2EFFB;
  --text-muted: #B8B5C5;
  --text-soft: #8B879B;
  --accent: #B57EDC;
  --accent-glow: rgba(181, 126, 220, 0.18);
  --gold: #FFD166;
  --teal: #8BE9FD;
  --rose: #FF6B8A;
  --error: #FF6B6B;
  --border: rgba(181, 126, 220, 0.22);
  --border-soft: rgba(255, 255, 255, 0.07);
  --max-width: 760px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Helvetica Neue',
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at top, rgba(181, 126, 220, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(255, 209, 102, 0.04), transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border-soft);
  padding: 22px 24px;
  background: rgba(15, 10, 30, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-logo {
  width: 32px;
  height: 32px;
  display: inline-block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='2' width='16' height='3' fill='%236E48B8'/><rect x='2' y='5' width='20' height='14' fill='%236E48B8'/><rect x='2' y='19' width='4' height='3' fill='%236E48B8'/><rect x='10' y='19' width='4' height='3' fill='%236E48B8'/><rect x='18' y='19' width='4' height='3' fill='%236E48B8'/><rect x='7' y='9' width='3' height='3' fill='%23F8F8F2'/><rect x='14' y='9' width='3' height='3' fill='%23F8F8F2'/><rect x='8' y='10' width='1' height='1' fill='%230F0A1E'/><rect x='15' y='10' width='1' height='1' fill='%230F0A1E'/><rect x='10' y='14' width='4' height='2' fill='%23FF6B8A'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.brand-name {
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 14px;
  color: var(--accent);
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav a:hover,
.nav a:focus {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ─── Main content ─── */
main {
  flex: 1;
  padding: 48px 24px;
}
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 12px 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 {
  font-size: 36px;
  margin-bottom: 8px;
}
h1 + .lead {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 32px 0;
}
h2 {
  font-size: 22px;
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
  color: var(--accent);
}
h2:first-of-type { border-top: none; padding-top: 0; }
h3 {
  font-size: 17px;
  margin-top: 28px;
  color: var(--gold);
}
h4 {
  font-size: 15px;
  margin-top: 20px;
  color: var(--teal);
}

p {
  margin: 0 0 16px 0;
  color: var(--text);
}

ul, ol {
  padding-left: 22px;
  margin: 0 0 16px 0;
}
li {
  margin-bottom: 8px;
  color: var(--text);
}
li > strong { color: var(--text); }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(181, 126, 220, 0.45);
  text-underline-offset: 2px;
  transition: color 120ms ease;
}
a:hover { color: var(--gold); text-decoration-color: var(--gold); }

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

code {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--gold);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  vertical-align: top;
}
th {
  background: var(--bg-elevated);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 32px 0;
}

blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}

/* ─── Meta info block at top of policy pages ─── */
.meta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 32px 0;
  font-size: 14px;
}
.meta-row {
  display: flex;
  gap: 12px;
  padding: 4px 0;
}
.meta-row strong {
  min-width: 100px;
  color: var(--accent);
}

/* ─── Callouts ─── */
.callout {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 18px 0;
}
.callout.warning { border-left-color: var(--gold); }
.callout.danger  { border-left-color: var(--error); }
.callout.info    { border-left-color: var(--teal); }
.callout-title {
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 6px 0;
}
.callout.warning .callout-title { color: var(--gold); }
.callout.danger .callout-title  { color: var(--error); }
.callout.info .callout-title    { color: var(--teal); }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
}
footer a { color: var(--text-muted); }

/* ─── Landing page hero ─── */
.hero {
  text-align: center;
  padding: 80px 0 48px;
}
.hero h1 {
  font-size: 56px;
  letter-spacing: 6px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero p {
  font-size: 20px;
  color: var(--text-muted);
  margin: 0 auto 32px;
  max-width: 520px;
}
.hero-mascot {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><rect x='4' y='2' width='16' height='3' fill='%236E48B8'/><rect x='2' y='5' width='20' height='14' fill='%236E48B8'/><rect x='2' y='19' width='4' height='3' fill='%236E48B8'/><rect x='10' y='19' width='4' height='3' fill='%236E48B8'/><rect x='18' y='19' width='4' height='3' fill='%236E48B8'/><rect x='7' y='9' width='3' height='3' fill='%23F8F8F2'/><rect x='14' y='9' width='3' height='3' fill='%23F8F8F2'/><rect x='8' y='10' width='1' height='1' fill='%230F0A1E'/><rect x='15' y='10' width='1' height='1' fill='%230F0A1E'/><rect x='10' y='14' width='4' height='2' fill='%23FF6B8A'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 18px var(--accent-glow));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 150ms ease, transform 150ms ease;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card h3 {
  margin: 0 0 6px 0;
  font-size: 17px;
  color: var(--accent);
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
  html { font-size: 15px; }
  main { padding: 32px 18px; }
  .site-header { padding: 16px 18px; }
  .nav { gap: 12px; }
  .nav a { font-size: 13px; }
  h1 { font-size: 28px; }
  h2 { font-size: 19px; }
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 36px; letter-spacing: 4px; }
  .hero p { font-size: 16px; }
  .hero-mascot { width: 90px; height: 90px; }
  table { font-size: 13px; }
  th, td { padding: 8px 10px; }
}

/* Light mode opt-in for users whose OS prefers it. We default to dark
   because Solace itself is dark-themed, but legal docs should respect
   the OS preference too. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #FAFAFC;
    --bg-card: #FFFFFF;
    --bg-elevated: #F2EFFB;
    --text: #1A0F2E;
    --text-muted: #4A4458;
    --text-soft: #6E6883;
    --accent: #6B3FA0;
    --accent-glow: rgba(107, 63, 160, 0.10);
    --gold: #B58900;
    --teal: #0EA5C2;
    --rose: #C2185B;
    --error: #C62828;
    --border: rgba(107, 63, 160, 0.18);
    --border-soft: rgba(0, 0, 0, 0.07);
  }
  body {
    background:
      radial-gradient(ellipse at top, rgba(107, 63, 160, 0.04), transparent 60%),
      var(--bg);
  }
  .site-header { background: rgba(255, 255, 255, 0.85); }
  code { color: #6B3FA0; }
}
