/* Pàgines estàtiques de la web comercial: blog i sectors (scripts/build-static-pages.mjs). */
:root {
  --navy: #0b1437;
  --ink: #0b1437;
  --muted: #59627a;
  --line: #d9dde6;
  --paper: #f4f5f8;
  --card: #ffffff;
  --accent: #5b8cff;
  --accent-ink: #2f5fd6;
  --soft: #e9eefc;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; overflow-wrap: break-word; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pg-skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 10; }
.pg-skip:focus { left: 16px; }

/* Capçalera */
.pg-nav { align-items: center; background: var(--card); border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding: 14px clamp(16px, 4vw, 48px); position: sticky; top: 0; z-index: 5; }
.pg-logo img { width: 124px; }
.pg-nav-right { align-items: center; display: flex; gap: 18px; }
.pg-nav-link { font-size: 15px; font-weight: 500; text-decoration: none; }
.pg-nav-link:hover { color: var(--accent-ink); }
.pg-langs { display: flex; font-size: 13px; gap: 2px; letter-spacing: .02em; }
.pg-langs a, .pg-langs span { border-radius: 6px; padding: 4px 7px; text-decoration: none; }
.pg-langs a { color: var(--muted); }
.pg-langs a:hover { background: var(--soft); color: var(--ink); }
.pg-langs span { background: var(--navy); color: #fff; }

/* Botons i enllaços */
.pg-button { background: var(--navy); border-radius: 10px; color: #fff; display: inline-block; font-size: 16px; font-weight: 600; padding: 13px 20px; text-decoration: none; transition: background .15s; }
.pg-button:hover { background: #18245a; }
.pg-button-small { font-size: 14px; padding: 9px 14px; }
.pg-link { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.pg-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-cta-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; }

/* Engrunes */
.pg-crumbs ol { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 14px; gap: 6px; list-style: none; margin: 0 0 28px; padding: 0; }
.pg-crumbs li + li::before { content: '/'; margin-right: 6px; opacity: .6; }
.pg-crumbs a { text-decoration: none; }
.pg-crumbs a:hover { color: var(--ink); text-decoration: underline; }

.pg-kicker { color: var(--accent-ink); font-size: 14px; font-weight: 600; letter-spacing: .02em; margin-bottom: 12px; }

/* Article */
.pg-article, .pg-sector, .pg-index-head, .pg-index-list, .pg-sectors, .pg-related { margin: 0 auto; max-width: 980px; padding: 40px clamp(16px, 4vw, 40px) 0; }
.pg-article-head h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 650; letter-spacing: -.02em; max-width: 22ch; }
.pg-byline { color: var(--muted); font-size: 16px; margin: 16px 0 0; }
.pg-hero { aspect-ratio: 16 / 9; border-radius: 16px; margin: 28px 0 0; object-fit: cover; width: 100%; }

.pg-summary { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-top: 28px; padding: clamp(20px, 4vw, 36px); }
.pg-summary h2, .pg-dialogue > h2, .pg-related h2, .pg-block h2, .pg-sectors h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 650; letter-spacing: -.01em; margin-bottom: 14px; }
.pg-summary > p { font-size: 18px; max-width: 70ch; }
.pg-summary-cols { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; margin-top: 22px; }
.pg-summary h3 { font-size: 17px; font-weight: 650; margin-bottom: 10px; }
.pg-summary ol, .pg-summary ul, .pg-block ul, .pg-block ol { margin: 0; padding-left: 1.3em; }
.pg-summary li, .pg-block li { margin-bottom: 8px; }
.pg-summary li::marker, .pg-block li::marker { color: var(--accent-ink); font-weight: 600; }

/* Diàleg */
.pg-dialogue { margin-top: 44px; }
.pg-line { align-items: flex-start; display: flex; gap: 12px; margin: 0 0 16px; }
.pg-line-guest { flex-direction: row-reverse; }
.pg-avatar { background: var(--navy); border-radius: 50%; flex: 0 0 56px; height: 56px; object-fit: cover; width: 56px; }
.pg-avatar-initial { align-items: center; background: var(--soft); border: 1px solid #c9d5f6; color: var(--navy); display: flex; font-family: var(--serif); font-size: 24px; font-style: italic; justify-content: center; }
.pg-bubble { background: var(--card); border: 1px solid var(--line); border-radius: 4px 18px 18px 18px; max-width: min(640px, 100%); padding: 12px 16px; }
.pg-line-guest .pg-bubble { background: var(--soft); border-color: #cfdaf8; border-radius: 18px 4px 18px 18px; }
.pg-bubble p { margin: 0; }
.pg-speaker { color: var(--muted); display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.pg-line-aina .pg-speaker { color: var(--accent-ink); }

/* Exemple de pantalla */
.pg-demo { background: var(--navy); border-radius: 16px; color: #fff; margin: 8px 0 24px; padding: 18px clamp(16px, 3vw, 24px); }
.pg-demo figcaption { color: #aebfee; font-size: 13px; font-weight: 600; letter-spacing: .03em; margin-bottom: 12px; }
.pg-demo ol { list-style: none; margin: 0; padding: 0; }
.pg-demo-row { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 0; }
.pg-demo-row:first-child { border-top: 0; padding-top: 0; }
.pg-demo-who { color: #aebfee; display: block; font-size: 13px; }
.pg-demo-lang { border: 1px solid rgba(174,191,238,.5); border-radius: 4px; font-size: 11px; margin-left: 6px; padding: 0 4px; }
.pg-demo-said { color: rgba(255,255,255,.66); font-size: 15px; margin: 4px 0 2px; }
.pg-demo-shown { font-family: var(--serif); font-size: 19px; line-height: 1.35; margin: 0; }
.pg-demo-arrow { color: var(--accent); font-family: var(--sans); }
.pg-demo-host .pg-demo-who { color: #8fb0ff; }

/* Crida final */
.pg-cta { align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 16px; display: flex; gap: 20px; margin: 44px 0 0; padding: clamp(20px, 4vw, 32px); }
.pg-cta img { background: var(--navy); border-radius: 50%; flex: 0 0 88px; width: 88px; }
.pg-cta h2 { font-size: 24px; font-weight: 650; margin-bottom: 8px; }
.pg-cta p { color: var(--muted); margin: 0; max-width: 62ch; }

/* Targetes */
.pg-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); list-style: none; margin: 0; padding: 0; }
.pg-card a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; }
.pg-card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pg-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.pg-card-meta { color: var(--muted); font-size: 13px; padding: 14px 16px 0; }
.pg-card strong { font-size: 19px; line-height: 1.25; padding: 6px 16px 0; }
.pg-card-desc { color: var(--muted); font-size: 15px; padding: 8px 16px 0; }
.pg-card-more { color: var(--accent-ink); font-size: 15px; font-weight: 600; margin-top: auto; padding: 14px 16px 16px; }
.pg-related { padding-bottom: 8px; }
.pg-related h2 { margin-top: 20px; }

/* Índex del blog */
.pg-index-intro { align-items: center; display: flex; gap: 32px; justify-content: space-between; }
.pg-index-intro h1 { font-size: clamp(34px, 6vw, 62px); font-weight: 650; letter-spacing: -.025em; max-width: 16ch; }
.pg-index-intro h1 em, .pg-sector-head h1 em { color: var(--accent-ink); font-family: var(--serif); font-weight: 400; }
.pg-index-intro p { color: var(--muted); font-size: 18px; margin-top: 18px; max-width: 58ch; }
.pg-index-intro img { background: var(--navy); border-radius: 50%; flex: 0 0 160px; width: 160px; }
.pg-index-list { padding-top: 28px; }
.pg-empty { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); padding: 24px; }
.pg-sectors { padding-bottom: 12px; padding-top: 48px; }
.pg-sectors > p { color: var(--muted); }
.pg-sectors ul { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); list-style: none; margin: 18px 0 0; padding: 0; }
.pg-sectors a { background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: block; height: 100%; padding: 16px; text-decoration: none; }
.pg-sectors a:hover { border-color: var(--accent); }
.pg-sectors strong { display: block; font-size: 17px; }
.pg-sectors span { color: var(--muted); display: block; font-size: 14px; line-height: 1.45; margin-top: 4px; }

/* Sector */
.pg-sector-head { align-items: center; display: grid; gap: 32px; grid-template-columns: 1.1fr 1fr; }
.pg-sector-head h1 { font-size: clamp(30px, 4.6vw, 48px); font-weight: 650; letter-spacing: -.02em; }
.pg-sector-head .pg-hero { margin: 0; }
.pg-lead { color: var(--muted); font-size: 18px; margin-top: 16px; }
.pg-block { margin-top: 48px; }
.pg-block > p { max-width: 70ch; }
.pg-block-split { align-items: start; display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.pg-block-split .pg-demo { margin: 0; }
.pg-plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); list-style: none; margin: 18px 0 0; padding: 0 !important; }
.pg-plan { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; margin: 0 !important; padding: 20px; }
.pg-plan-group { color: var(--muted); font-size: 13px; font-weight: 600; }
.pg-plan strong { font-size: 22px; margin-top: 4px; }
.pg-plan-price { font-size: 30px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.pg-plan-price small { color: var(--muted); font-size: 15px; font-weight: 500; letter-spacing: 0; }
.pg-plan-time { color: var(--accent-ink); font-size: 14px; font-weight: 600; margin-top: 4px; }
.pg-plan p { font-size: 15px; margin: 12px 0; }
.pg-plan-tax { color: var(--muted); font-size: 13px; margin-top: auto; }
.pg-small { font-size: 15px; margin-top: 14px; }
.pg-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.pg-faq summary { cursor: pointer; font-weight: 600; list-style-position: outside; padding: 14px 0; }
.pg-faq details p { color: var(--muted); margin: 0 0 16px; }
.pg-404 { padding-bottom: 40px; }
.pg-404 img { background: var(--navy); border-radius: 50%; width: 120px; }

/* Peu */
.pg-footer { background: var(--navy); color: #c6cde4; margin-top: 72px; padding: 40px clamp(16px, 4vw, 48px) 24px; }
.pg-footer-main { display: grid; gap: 28px; grid-template-columns: 1.3fr 1fr 1fr; margin: 0 auto; max-width: 1080px; }
.pg-footer-main img { filter: brightness(0) invert(1); width: 124px; }
.pg-footer-main p { font-size: 15px; margin-top: 14px; max-width: 32ch; }
.pg-footer-main span { color: #fff; display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.pg-footer-main a { display: block; font-size: 15px; padding: 3px 0; text-decoration: none; }
.pg-footer-main a:hover { color: #fff; text-decoration: underline; }
.pg-footer-bottom { border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; margin: 28px auto 0; max-width: 1080px; padding-top: 16px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .pg-nav { gap: 10px; padding-bottom: 10px; padding-top: 10px; }
  .pg-logo img { width: 104px; }
  .pg-nav-right { gap: 10px; }
  .pg-nav-link, .pg-button-small { display: none; }
  .pg-summary-cols, .pg-sector-head, .pg-block-split, .pg-footer-main { grid-template-columns: 1fr; }
  .pg-index-intro img { display: none; }
  .pg-avatar { flex-basis: 40px; height: 40px; width: 40px; }
  .pg-avatar-initial { font-size: 18px; }
  .pg-line { gap: 8px; }
  .pg-cta { flex-direction: column; }
  .pg-cta img { flex-basis: auto; width: 64px; }
  .pg-hero { border-radius: 12px; }
}

/* Doble crida: per a la persona i per al seu equip. */
.pg-cta-split {
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}
.pg-cta-split a {
  margin-left: 0.25rem;
  font-weight: 700;
  color: #2f5fe0;
  text-decoration: none;
}
