/* ==========================================================================
   Base: fonts, tipografia, enllaços, focus, utilitats de retícula
   ========================================================================== */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html { -webkit-text-size-adjust: 100%; }
body.hq {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
.hq *, .hq *::before, .hq *::after { box-sizing: border-box; }
.hq img, .hq svg { display: block; max-width: 100%; height: auto; }
.hq :where(a) { color: var(--color-accent-700); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.hq :where(a:hover) { color: var(--color-accent); }
.hq a:focus-visible, .hq button:focus-visible, .hq input:focus-visible, .hq select:focus-visible, .hq textarea:focus-visible, .hq [tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.hq .hq-section:target, .hq .hq-section:focus, .hq [id]:target:not(a):not(button):not(input) { outline: none; }
.hq ::selection { background: var(--color-accent-200); color: var(--color-text); }

.hq h1, .hq h2, .hq h3, .hq h4, .hq h5, .hq h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  color: var(--color-text);
  margin: 0;
  text-wrap: balance;
}
.hq h1 { font-size: var(--h1-page); line-height: 1; letter-spacing: -0.03em; }
.hq h2 { font-size: var(--h2); line-height: 1.06; letter-spacing: -0.02em; }
.hq h3 { font-size: var(--h3); line-height: 1.15; letter-spacing: -0.01em; }
.hq h4 { font-size: 17px; line-height: 1.25; }
.hq p { margin: 0 0 1em; }
.hq p:last-child { margin-bottom: 0; }
.hq strong { font-weight: 800; }

/* Escala tipogràfica reutilitzable */
.hq-display { font-family: var(--font-heading); font-weight: 800; font-size: var(--h1); line-height: 1; letter-spacing: -0.03em; margin: 0 0 0 -0.058em; }
.hq-h1 { font-family: var(--font-heading); font-weight: 800; font-size: var(--h1-page); line-height: 1; letter-spacing: -0.03em; margin: 0 0 0 -0.05em; }
.hq-h2 { font-family: var(--font-heading); font-weight: 800; font-size: var(--h2); line-height: 1.06; letter-spacing: -0.02em; margin: 0; }
.hq-h3 { font-family: var(--font-heading); font-weight: 800; font-size: var(--h3); line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
.hq-line { display: block; }
.hq-line--accent { color: var(--color-accent); }
.hq-on-dark .hq-line--accent, .hq-on-accent .hq-line--accent { color: var(--color-bg); }
.hq-kicker {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-kicker);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  margin: 0 0 14px;
}
.hq-kicker--muted { color: var(--color-text-60); font-size: 12px; }
.hq-lead { font-size: var(--text-lead); line-height: 28px; color: var(--color-text-82); max-width: 44ch; }
.hq-text { font-size: var(--text-small); line-height: 26px; color: var(--color-text-78); }
.hq-text p { margin: 0 0 1em; }
.hq-text p:last-child { margin: 0; }
.hq-text strong { color: var(--color-text); }
.hq-note { font-size: 13px; line-height: 20px; color: var(--color-text-60); }
.hq-muted { color: var(--color-text-60); }
.hq-label {
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-60);
}

/* Retícula */
.hq-section { position: relative; }
.hq-section--surface { background: var(--color-surface); }
.hq-section--dark { background: var(--color-text); color: var(--color-bg); }
.hq-section--accent { background: var(--color-accent); color: var(--color-bg); }
.hq-section--rule-top { border-top: var(--rule); }
.hq-section--rule-bottom { border-bottom: var(--rule); }
.hq-container { max-width: var(--container); margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }
.hq-container--wide { max-width: none; }
.hq-section__inner { padding-top: var(--section-pad-top); padding-bottom: var(--section-pad-bottom); }
.hq-section__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 32px; flex-wrap: wrap;
  padding: 0 0 28px;
}
.hq-section__head .hq-h2 { max-width: 22ch; }
.hq-section__head-right { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hq-hr { border: 0; border-top: var(--rule); margin: 0; }
.hq-hr--strong { border-top: var(--rule-strong); }

/* Graelles */
.hq-grid { display: grid; gap: 32px 40px; }
.hq-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.hq-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.hq-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.hq-grid--cells { gap: 0; border-top: var(--rule-strong); border-bottom: var(--rule-strong); }
.hq-grid--cells > * { padding: 28px 22px; border-right: 1px solid var(--color-divider); }
.hq-grid--cells > *:last-child { border-right: 0; }
@media (max-width: 700px) {
  .hq-grid--cells > * { border-right: 0; border-bottom: 1px solid var(--color-divider); }
  .hq-grid--cells > *:last-child { border-bottom: 0; }
}

/* Imatges */
.hq-figure { position: relative; overflow: hidden; background: var(--color-neutral-300); margin: 0; }
.hq-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hq-fit-contain img { object-fit: contain; }
.hq-bw .grayscale img { filter: grayscale(1) contrast(1.05); }
.hq-figure-wrap { margin: 0; }
.hq-figcaption { font-size: 13px; line-height: 20px; color: var(--color-text-60); padding: 10px 0 0; }
.hq-placeholder span, a .hq-placeholder { color: inherit; text-decoration: none; }
a.hq-product__img { text-decoration: none; }
.hq-placeholder {
  display: grid; place-items: center; background: var(--color-neutral-200);
  border: 2px dashed var(--color-neutral-400); color: var(--color-neutral-600);
  font: 800 12px/1 var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; padding: 16px;
}

/* Accessibilitat */
.screen-reader-text, .hq-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .hq *, .hq *::before, .hq *::after { transition: none !important; animation: none !important; } }

/* Contingut editor (text lliure / notícies / legals) */
.hq-prose { font-size: 17px; line-height: 29px; color: var(--color-text-82); max-width: 68ch; }
.hq-prose > * + * { margin-top: 1.1em; }
.hq-prose h2 { font-size: 26px; line-height: 1.15; margin-top: 1.8em; color: var(--color-text); }
.hq-prose h3 { font-size: 20px; margin-top: 1.5em; color: var(--color-text); }
.hq-prose ul, .hq-prose ol { padding-left: 1.3em; }
.hq-prose li + li { margin-top: 0.4em; }
.hq-prose li::marker { color: var(--color-accent); font-weight: 800; }
.hq-prose blockquote {
  margin: 1.6em 0; padding: 8px 0 8px 22px; border-left: 4px solid var(--color-accent);
  font-family: var(--font-heading); font-weight: 800; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; color: var(--color-text);
}
.hq-prose blockquote footer, .hq-prose blockquote cite { display: block; margin-top: 10px; font: 800 12px/1 var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-60); font-style: normal; }
.hq-prose figure { margin: 1.6em 0; }
.hq-prose figcaption { font-size: 13px; line-height: 20px; color: var(--color-text-60); padding-top: 10px; }
.hq-bw .hq-prose img { filter: grayscale(1); }
.hq-prose a { font-weight: 600; }
.hq-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hq-prose th { text-align: left; font: 800 12px/1.2 var(--font-heading); letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 8px; border-bottom: 2px solid var(--color-text); }
.hq-prose td { padding: 10px 8px; border-bottom: 1px solid var(--color-divider-soft); vertical-align: top; }
