/* ===========================================
   Legal pages (privacy-policy.html, terms-and-policy.html)
   Loaded after main.css and brand.v3.css: the same tokens, typefaces and
   header/footer as index.html, plus a reading layout for long texts.
   /assets is cached for a year: a change means a new file name (legal.v2.css).
   =========================================== */

/* One language at a time. legal.v1.js sets html[lang]. */
[data-lang] { display: none; }
html[lang="sv"] [data-lang="sv"],
html[lang="en"] [data-lang="en"] { display: revert; }

/* ---- Page hero: the homepage hero's voice, without its picture ---- */
.legal-hero {
  position: relative;
  padding: 72px 0 64px;
  color: var(--cream);
  background: var(--navy);
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 85% 20%, rgba(212, 175, 55, 0.14), transparent 55%);
  pointer-events: none;
}

.legal-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.legal-hero .container {
  position: relative;
  z-index: 1;
}

.legal-hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.legal-hero .hero-eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--gold);
}

.legal-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: #fff;
}

.legal-hero .legal-updated {
  margin: 18px 0 0;
  font-size: 15px;
  color: rgba(250, 248, 243, 0.66);
}

.legal-hero .legal-updated strong {
  font-weight: 500;
  color: var(--cream);
}

/* ---- Reading column ---- */
.legal-section {
  padding: 64px 0 96px;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}

.legal-content > p:first-child {
  font-size: 18px;
}

.legal-content h2 {
  margin: 56px 0 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}

.legal-content h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  margin-bottom: 18px;
  background: var(--gold);
}

.legal-content h3 {
  margin: 32px 0 12px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.legal-content h4 {
  margin: 24px 0 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.legal-content p,
.legal-content ul {
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content strong {
  font-weight: 600;
  color: var(--ink);
}

.legal-content a {
  color: var(--gold-ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.legal-content code {
  padding: 1px 7px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.92em;
  color: var(--ink);
  background: var(--cream-2);
}

/* The short version, and other asides */
.legal-note {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--cream);
}

.legal-note p:last-child {
  margin-bottom: 0;
}

/* A role (auction house, seller, buyer): a card like the homepage's */
.legal-card {
  margin: 20px 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.legal-card h4 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

.legal-card h4 br {
  display: none;
}

.legal-card h4 .role-tag {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.legal-card > :last-child {
  margin-bottom: 0;
}

/* Tables (cookies, legal bases, sub-processors, retention) */
.legal-table-wrap {
  margin: 20px 0 28px;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.55;
  background: #fff;
}

.legal-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--gold-ink);
  white-space: nowrap;
}

.legal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table td:first-child {
  color: var(--ink);
  font-weight: 500;
}

/* The contact card at the end of the terms */
.legal-contact {
  margin: 24px 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--cream);
}

.legal-contact h4 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

.legal-contact p {
  margin-bottom: 4px;
}

/* Closing line and the way back */
.legal-end {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.legal-end p {
  max-width: 36rem;
  margin: 0 auto 24px;
  font-size: 15px;
  color: var(--ink-3);
}

@media (max-width: 767px) {
  .legal-hero {
    padding: 48px 0 44px;
  }

  .legal-section {
    padding: 44px 0 64px;
  }

  .legal-content {
    font-size: 16px;
  }

  .legal-content h2 {
    margin-top: 44px;
    font-size: 23px;
  }

  .legal-card,
  .legal-contact {
    padding: 20px;
  }
}
