/* Shared styles for the legal pages — same tokens as index.html */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #FAF7F4;
  --bg-warm: #F3EBE5;
  --surface: #FFFFFF;
  --rose: #C8849A;
  --rose-dark: #A8637E;
  --rose-light: #EDD5D0;
  --cream: #2C1F1A;
  --cream-muted: #5C4A40;
  --text-muted: #9A8880;
  --border: rgba(200,132,154,0.22);
  --border-subtle: rgba(44,31,26,0.09);
  --font-title: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --nav-h: 72px;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* Show only the active language */
html[lang="ca"] [data-lang="es"],
html[lang="es"] [data-lang="ca"] { display: none !important; }

/* Header */
.l-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 2.5rem;
  background: rgba(250,247,244,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.l-logo { display: flex; align-items: center; gap: 0.75rem; }
.l-logo img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.l-logo span { font-family: var(--font-title); font-size: 1.2rem; letter-spacing: 0.08em; }
.l-right { display: flex; align-items: center; gap: 1rem; }
.l-back {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream-muted); transition: color 0.25s;
}
.l-back:hover { color: var(--rose-dark); }
.nav-wa {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.05rem;
  background: #25D366; color: #fff;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 100px;
  transition: background 0.3s;
}
.nav-wa:hover { background: #1EBF5B; }
.nav-wa svg { width: 16px; height: 16px; }
.lang-toggle { display: flex; border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.lang-toggle button {
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}
.lang-toggle button.active { background: var(--rose); color: #fff; }

/* Content */
.l-main { max-width: 820px; margin: 0 auto; padding: 4.5rem 2.5rem 6rem; }
.l-label {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--rose-dark); margin-bottom: 1rem;
}
.l-label::before { content: ''; width: 24px; height: 1px; background: var(--rose); }
.l-main h1 {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 300; line-height: 1.1;
  margin-bottom: 2.5rem;
}
.l-main h2 {
  font-family: var(--font-title);
  font-size: 1.6rem; font-weight: 400;
  margin: 2.75rem 0 0.9rem;
  color: var(--cream);
}
.l-main h3 { font-size: 0.95rem; font-weight: 500; margin: 1.5rem 0 0.5rem; }
.l-main p, .l-main li { font-size: 0.95rem; color: var(--cream-muted); }
.l-main p + p { margin-top: 0.9rem; }
.l-main ul { margin: 0.75rem 0 0 1.25rem; }
.l-main li { margin-bottom: 0.45rem; }
.l-main a { color: var(--rose-dark); text-decoration: underline; text-underline-offset: 2px; }
.l-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0;
}
.l-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; font-size: 0.92rem; }
.l-card dt { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.15rem; }
.l-card dd { color: var(--cream); }
.ph { background: #FFF1C2; color: #6B4E00; padding: 0 0.3rem; border-radius: 3px; font-weight: 500; }
.l-table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 560px; }
th, td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
th { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose-dark); font-weight: 500; background: var(--bg-warm); }
td { color: var(--cream-muted); }
.l-updated { margin-top: 3.5rem; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); padding-top: 1.25rem; }

/* Footer */
footer { background: #3A2820; padding: 1.75rem 2.5rem; color: #B8A8A0; font-size: 0.75rem; }
.f-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.75rem; }
.f-legal { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; }
.f-legal a { color: #B8A8A0; transition: color 0.25s; }
.f-legal a:hover { color: #F0EBE5; }
.f-legal a[aria-current="page"] { color: var(--rose-light); }
.f-credit { color: #8A7870; }
.f-credit a { color: var(--rose-light); }
.f-credit a:hover { color: #fff; }

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .l-nav { padding: 0 1.25rem; }
  .l-back { display: none; }
  .nav-wa span { display: none; }
  .nav-wa { padding: 0.55rem; }
  .l-main { padding: 3rem 1.25rem 4.5rem; }
  .l-card dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .l-card dd { margin-bottom: 0.6rem; }
  footer { padding: 2rem 1.25rem; }
  .f-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) { .l-logo span { display: none; } }
