/* =========================================================
   Xari — Legal Pages (Privacy & Terms)
   Shared stylesheet. Adjust the brand tokens below to
   match Xari's identity (colors, fonts, logo).
   ========================================================= */

:root {
  /* Brand palette — tweak these to rebrand the whole site */
  --brand:        #2563eb;
  --brand-dark:   #1e40af;
  --brand-soft:   #eff6ff;

  /* Neutrals */
  --bg:           #f7f8fa;
  --surface:      #ffffff;
  --text:         #1a1f2b;
  --text-muted:   #5b6472;
  --border:       #e6e8ec;

  /* Layout */
  --maxw:         860px;
  --radius:       14px;
  --shadow:       0 1px 2px rgba(16, 24, 40, .04),
                  0 8px 24px rgba(16, 24, 40, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #0e1116;
    --surface:    #171b22;
    --text:       #e7eaf0;
    --text-muted: #9aa3b2;
    --border:     #262b34;
    --brand-soft: #15233f;
    --shadow:     0 1px 2px rgba(0, 0, 0, .3),
                  0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: .95rem;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 80px; }

.hero { text-align: center; padding: 28px 0 12px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 10px; letter-spacing: -.02em; }
.hero p { color: var(--text-muted); max-width: 56ch; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Project cards (landing) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 36px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--text); }
.card p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.card__cta { margin-top: 14px; color: var(--brand); font-weight: 600; font-size: .9rem; }

/* ---------- Document link rows (project hub) ---------- */
.doc-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.doc-list a {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.doc-list a:hover { border-color: var(--brand); text-decoration: none; }
.doc-list .doc-title { font-weight: 600; }
.doc-list .doc-lang { color: var(--text-muted); font-size: .85rem; }

/* ---------- Legal document ---------- */
.legal { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px clamp(20px, 5vw, 56px);
  box-shadow: var(--shadow); }
.legal h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 4px; letter-spacing: -.02em; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal .updated { color: var(--text-muted); font-size: .9rem; margin: 0 0 8px; }

/* placeholder marker for not-yet-filled content */
.placeholder {
  border: 1px dashed var(--border);
  background: var(--brand-soft);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: .92rem;
}

/* ---------- Language switch ---------- */
.langbar { display: flex; gap: 8px; margin-bottom: 22px; }
.langbar a {
  font-size: .85rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--surface);
}
.langbar a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.langbar a:hover { text-decoration: none; border-color: var(--brand); }

/* ---------- Breadcrumb / back ---------- */
.crumbs { font-size: .9rem; color: var(--text-muted); margin-bottom: 18px; }
.crumbs a { color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .88rem;
}
.site-footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 24px 20px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}
