*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #0d2b47;
  --navy2:  #1c3a5a;
  --gold:   #e79a1f;
  --gold-light: #ffcf7a;
  --pale:   #fbf1dd;
  --white:  #ffffff;
  --paper:  #fffdf8;
  --gray:   #faf6ec;
  --text:   #23303d;
  --muted:  #5a6672;
  --line:   #e3d8bd;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.75;
}

/* ── NAV ─────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 246, 236, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(13,43,71,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  height: 110px;
}

.nav-logo {
  height: 84px;
  width: auto;
  display: block;
}

.nav-back {
  position: absolute;
  right: 5%;
  color: var(--navy);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .2s;
}
.nav-back:hover { color: var(--gold); }

/* ── HERO ─────────────────────────────────── */
.legal-hero {
  background: linear-gradient(150deg, var(--navy) 0%, #071a2c 100%);
  padding: 64px 5% 52px;
  text-align: center;
}

.section-label {
  display: inline-block;
  color: var(--gold-light);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .7rem;
}

.legal-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: .5rem;
}

.update-date {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
}

/* ── BODY ─────────────────────────────────── */
.legal-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 5% 80px;
}

/* TOC */
.toc {
  background: var(--gray);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 1.4rem 1.8rem;
  margin-bottom: 3rem;
}

.toc h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy);
  margin-bottom: .8rem;
}

.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; }
.toc a {
  color: var(--navy);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}
.toc a:hover { color: var(--gold); }

/* INFO BOX */
.info-box {
  background: var(--pale);
  border: 1px solid rgba(231,154,31,.3);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  font-size: .92rem;
  color: var(--navy);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.highlight-box {
  background: #fff4e2;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.4rem;
  font-size: .9rem;
  color: #6b4a12;
  margin-top: 1.2rem;
  line-height: 1.7;
}

/* SECTIONS */
section { margin-bottom: 3.2rem; padding-top: .4rem; }

section h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--pale);
}

section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.4rem 0 .6rem;
}

section p { color: var(--muted); margin-bottom: .9rem; font-size: .97rem; }
section ul { padding-left: 1.4rem; margin-bottom: 1rem; }
section ul li { color: var(--muted); font-size: .97rem; margin-bottom: .45rem; }
section ul li strong { color: var(--navy); }

/* DATA TABLE */
.data-table {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 1rem 0 1.4rem;
}
.data-row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: none; }
.data-key {
  background: var(--gray);
  padding: .65rem 1rem;
  font-size: .83rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-val { padding: .65rem 1rem; font-size: .93rem; color: var(--muted); }

/* RIGHTS GRID */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.right-card {
  background: var(--gray);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem;
  transition: border-color .2s;
}
.right-card:hover { border-color: rgba(231,154,31,.5); }
.right-icon { font-size: 1.4rem; margin-bottom: .5rem; }
.right-card h4 { font-size: .9rem; font-weight: 700; color: var(--navy); margin-bottom: .4rem; }
.right-card p { font-size: .82rem; margin: 0; }

/* COOKIE TYPE CARDS */
.cookie-type-card { border-radius: 10px; border: 1px solid var(--line); padding: 1.3rem 1.5rem; margin-bottom: 1rem; }
.cookie-type-header { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; flex-wrap: wrap; }
.cookie-type-header h3 { margin: 0; font-size: 1rem; }
.cookie-badge {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .7rem; border-radius: 20px; white-space: nowrap;
}
.essential-badge  { background: #dcfce7; color: #166534; }
.analytics-badge  { background: #fef9c3; color: #854d0e; }
.functional-badge { background: #dbeafe; color: #1e40af; }

.essential  { border-left: 4px solid #22c55e; }
.analytics  { border-left: 4px solid #eab308; }
.functional { border-left: 4px solid #3b82f6; }

/* TABLE */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  background: var(--navy); color: var(--white); padding: .65rem 1rem; text-align: left;
  font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
}
td { padding: .65rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
tr:nth-child(even) td { background: var(--gray); }

code {
  background: #fbf1dd; color: #7a4e0a; padding: .15rem .45rem; border-radius: 4px;
  font-size: .83rem; font-family: 'Courier New', monospace;
}

.table-note { font-size: .82rem; color: var(--muted); font-style: italic; margin-top: .6rem; }

/* BROWSER GRID */
.browser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.browser-card {
  display: flex; flex-direction: column; gap: .25rem;
  background: var(--gray); border: 1px solid var(--line); border-radius: 8px; padding: 1rem;
  text-decoration: none; transition: border-color .2s, background .2s;
}
.browser-card:hover { border-color: var(--gold); background: var(--pale); }
.browser-card strong { color: var(--navy); font-size: .9rem; }
.browser-card span   { color: #b3720f; font-size: .8rem; }

/* ── FOOTER ─────────────────────────────────── */
footer {
  background: var(--navy);
  padding: 2.4rem 5%;
  color: rgba(255,255,255,.5);
  font-size: .85rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.5rem 2rem;
}
.footer-logo { height: 62px; width: auto; filter: brightness(0) invert(1) opacity(.55); }
.footer-center { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.footer-copy { font-size: .82rem; color: rgba(255,255,255,.4); text-align: center; margin: 0; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: rgba(255,255,255,.55); text-decoration: none; font-size: .82rem; transition: color .2s; }
.footer-links a:hover { color: var(--gold-light); }

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .data-row { grid-template-columns: 1fr; }
}

/* ── COOKIE BANNER (compartit amb la resta del lloc) ──────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, background-color .25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #d9860f 100%);
  color: var(--navy);
  box-shadow: 0 10px 26px rgba(231,154,31,.28);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(13,43,71,.28);
}
.btn-outline:hover { border-color: var(--navy); background: rgba(13,43,71,.05); }

.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 800;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 14px 40px rgba(13,43,71,.18);
  transform: translateY(140%);
  transition: transform .5s cubic-bezier(.22,.9,.32,1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { font-size: .87rem; color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cookie-banner-actions .btn { padding: 10px 20px; font-size: .85rem; }
.cookie-banner-actions a.more-link { font-size: .82rem; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
