/* Shared styles for legal pages (avís legal, privacitat, cookies, accessibilitat) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0d14;
  --bg2: #0f1420;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #e8eaf0;
  --text-muted: #9aa0b8;
  --text-dim: #4a5168;
  --accent: #4f8ef7;
  --link: #7db2ff;
  --radius: 14px;
}

:root[data-theme="light"] {
  --bg: #f3f4f7;
  --bg2: #e8eaf0;
  --surface: rgba(0,0,0,0.03);
  --border: rgba(0,0,0,0.1);
  --text: #1a1d29;
  --text-muted: #4a5168;
  --text-dim: #7a8099;
  --accent: #2563eb;
  --link: #1d4ed8;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.brand img { height: 28px; width: auto; }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.header-actions a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.header-actions a:hover { color: var(--text); }

#theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  width: 100%;
}

main h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

main .updated {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

main h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

main h3 {
  font-size: 1.05rem;
  margin: 1.4rem 0 0.5rem;
}

main p, main li { color: var(--text-muted); margin-bottom: 0.75rem; }

main ul, main ol { padding-left: 1.4rem; margin-bottom: 1rem; }

main a { color: var(--link); }

main strong { color: var(--text); }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.92rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
  color: var(--text-muted);
}

th { color: var(--text); background: var(--surface); }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

footer.site-footer a { color: var(--text-dim); text-decoration: none; }
footer.site-footer a:hover { color: var(--text-muted); }

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

#cookie-banner[hidden] { display: none; }

#cookie-banner p { color: var(--text-muted); font-size: 0.88rem; max-width: 620px; margin: 0; }

#cookie-banner .cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

#cookie-banner button {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

#cookie-banner button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
