/* bomberscat.app — estils compartits (blog + pàgines legals). Paleta:
   vermell bomber + groc Ifylabs, light mode. Sense frameworks. */

/* Hanken Grotesk self-hosted (/fonts): cap dependència de Google en runtime */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/hanken-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/hanken-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+2030; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/hanken-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/hanken-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+2030; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/hanken-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/hanken-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+2030; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/hanken-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/hanken-800-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+2030; }

:root {
  --primary: #C8102E;
  --primary-dark: #9A0B23;
  --primary-deep: #6E0616;
  --primary-soft: #FBDCE1;
  --accent: #e6a800;
  --accent-soft: #ffdea5;
  --bg: #f8fafb;
  --surface: #ffffff;
  --text: #191c1d;
  --text-muted: #43474e;
  --outline: #c3c6cf;
  --success: #2d6a4f;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Capçalera */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--outline);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 800;
  font-size: 22px;
}
.brand img { width: 32px; height: 32px; }
.topbar nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  margin-left: 12px;
  display: inline-block;
  padding: 12px 6px; /* target tàctil ≥44px */
}
.topbar nav a:hover { color: var(--primary); }
@media (max-width: 520px) {
  .hide-sm { display: none; } /* «(C1 català)» fora en mòbil: la topbar no es trenca */
  .brand { font-size: 19px; }
}

/* Hero (índex del blog) */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 {
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  color: var(--primary);
  margin: 24px 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}
/* Navegació amb teclat sempre visible */
:focus-visible {
  outline: 3px solid var(--primary-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Blog */
.blog-list { display: flex; flex-direction: column; gap: 16px; padding: 24px 0 64px; }
.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-decoration: none;
  color: inherit;
}
.post-card h2 { margin: 0 0 6px; color: var(--primary); font-size: 20px; }
.post-card p { margin: 0; color: var(--text-muted); font-size: 15px; }
.post-card .meta { display: block; margin-top: 10px; font-size: 13px; color: var(--text-muted); }

article.post { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; margin: 32px 0 64px; }
article.post h1 { color: var(--primary); font-size: clamp(26px, 4.5vw, 36px); line-height: 1.2; margin: 0 0 8px; }
article.post .meta { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
article.post h2 { color: var(--primary); margin: 32px 0 8px; font-size: 22px; }
article.post table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
article.post th, article.post td { border: 1px solid var(--outline); padding: 8px 12px; text-align: left; vertical-align: top; }
article.post th { background: var(--primary-soft); color: var(--primary-deep); }
article.post .box {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 15px;
}
article.post .font-ref {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--primary-deep);
}
@media (max-width: 640px) {
  article.post { padding: 24px 18px; }
  /* Taules apilades: th a sobre, td a sota — res d'esclafar dues columnes */
  article.post table, article.post tbody { display: block; }
  article.post tr {
    display: block;
    border: 1px solid var(--outline);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
  }
  article.post th, article.post td { display: block; border: none; }
  article.post th { border-bottom: 1px solid var(--outline); }
}

/* Llista d'espera */
.waitlist {
  background: var(--primary-deep);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  margin: 8px 0 48px;
  text-align: center;
}
.waitlist h2 { color: #fff; margin: 0 0 8px; font-size: 24px; }
.waitlist > p { margin: 0 auto 20px; max-width: 480px; color: #fbdce1; font-size: 16px; }
.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 460px;
  margin: 0 auto;
}
.waitlist-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 16px;
}
.waitlist-form button {
  min-height: 48px;
  border: none;
  border-radius: 999px;
  padding: 0 28px;
  background: var(--accent);
  color: #43140a;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.waitlist-form button:disabled { opacity: 0.7; cursor: default; }
.waitlist .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist-note { margin: 14px 0 0; font-size: 13px; color: #f2b8c1; }
.waitlist-note a { color: #fbdce1; }
.waitlist-msg { margin: 12px 0 0; font-weight: 600; min-height: 1.2em; }
.waitlist-msg.ok { color: #8ff7c4; }
.waitlist-msg.err { color: #ffdad6; }

/* Peu */
footer {
  border-top: 1px solid var(--outline);
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 14px;
}
footer .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
footer a { color: var(--text-muted); }
footer .legal { font-size: 12px; color: #73777f; max-width: 720px; margin-top: 12px; }
