/* ════════════════════════════════════════════════════════════════
   marketreports.cloud — Chrome del sitio (header · botones · footer)
   Compartido por index, blog, contacto y legal.
   Cargar después de design-tokens.css y shared.css.
   ═══════════════════════════════════════════════════════════════ */

body { background: var(--bg-page); overflow-x: hidden; }

/* ── Header ── */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg-page) 72%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.head-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.head-nav { display: flex; align-items: center; gap: 4px; margin-left: 16px; }
.head-nav a { color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--r-md); text-decoration: none; transition: color .15s, background .15s; }
.head-nav a:hover { color: var(--text-primary); background: var(--bg-hover); }
.head-nav a[aria-current="page"] { color: var(--text-primary); background: var(--bg-hover); }
.head-spacer { flex: 1; }
.head-actions { display: flex; align-items: center; gap: 8px; }

/* ── Botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue-500) 50%, transparent); }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--blue-500) 70%, transparent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); text-decoration: none; }
.btn-sec { background: rgba(255,255,255,.04); color: var(--text-primary); border-color: var(--border-strong); }
.btn-sec:hover { background: rgba(255,255,255,.08); text-decoration: none; }
html:not([data-theme="dark"]) .btn-sec { background: var(--bg-surface); }
html:not([data-theme="dark"]) .btn-sec:hover { background: var(--bg-hover); }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* ── Secciones ── */
section { scroll-margin-top: 80px; }
.sec-pad { padding: 96px 0; }
.sec-head { max-width: 660px; margin: 0 auto 56px; text-align: center; }
.sec-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--comp); }
.sec-head h2 { margin: 12px 0 14px; font-size: 38px; font-weight: 500; letter-spacing: -0.03em; color: var(--text-primary); text-wrap: balance; }
.sec-head p { margin: 0; font-size: 17px; color: var(--text-secondary); line-height: 1.55; }

/* ── Cabecera de página interior (blog, contacto, legal) ── */
.page-head { padding: 76px 0 44px; }
.page-head .sec-eyebrow { display: block; margin-bottom: 12px; }
.page-head h1 { margin: 0 0 14px; font-size: 46px; font-weight: 500; letter-spacing: -0.03em; color: var(--text-primary); text-wrap: balance; }
.page-head p { margin: 0; font-size: 17px; color: var(--text-secondary); line-height: 1.6; max-width: 60ch; }

/* ── Chips de tag (blog) ── */
.tag-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: var(--r-full); background: var(--biz-subtle); color: var(--blue-300); }
html:not([data-theme="dark"]) .tag-chip { color: var(--blue-600); }
.post-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }

/* ── Footer ── */
.site-foot { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.foot-brand .logo-lockup { margin-bottom: 14px; }
.foot-brand p { margin: 0; font-size: 14px; color: var(--text-tertiary); line-height: 1.6; max-width: 30ch; }
.foot-col h4 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); font-weight: 500; }
.foot-col a { display: block; font-size: 14px; color: var(--text-secondary); padding: 5px 0; text-decoration: none; }
.foot-col a:hover { color: var(--text-primary); text-decoration: none; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.foot-bottom .copy { font-size: 13px; color: var(--text-tertiary); }

/* ── Newsletter (footer) ── */
.foot-news { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 26px 28px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--bg-surface); margin-bottom: 40px; }
.foot-news .fn-copy h4 { margin: 0 0 4px; font-size: 16px; font-weight: 500; color: var(--text-primary); letter-spacing: 0; text-transform: none; }
.foot-news .fn-copy p { margin: 0; font-size: 13.5px; color: var(--text-tertiary); }
.fn-form { display: flex; gap: 10px; align-items: center; }
.fn-form input { font: inherit; font-size: 14px; color: var(--text-primary); background: var(--bg-page); border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: 10px 14px; width: 240px; transition: border-color .15s, box-shadow .15s; }
.fn-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.fn-form .fn-ok { display: none; font-size: 14px; font-weight: 500; color: var(--comp); }
.fn-form.fn-done input, .fn-form.fn-done button { display: none; }
.fn-form.fn-done .fn-ok { display: inline-flex; }

/* ── Barra sticky de registro ── */
.sticky-cta { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(80px); z-index: 70; display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-full); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: transform .3s, opacity .3s; }
.sticky-cta.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.sticky-cta .sc-txt { font-size: 14px; font-weight: 500; color: var(--text-primary); white-space: nowrap; }
.sticky-cta .btn { padding: 8px 16px; font-size: 13.5px; }
.sticky-cta .sc-close { display: inline-grid; place-items: center; width: 30px; height: 30px; border: none; background: transparent; color: var(--text-tertiary); cursor: pointer; border-radius: 50%; flex: none; }
.sticky-cta .sc-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.sticky-cta .sc-close svg { width: 14px; height: 14px; }

@media (max-width: 980px) {
  .head-nav { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fn-form { width: 100%; }
  .fn-form input { flex: 1; width: auto; }
  .sticky-cta .sc-txt { display: none; }
  .sec-head h2 { font-size: 28px; }
  .page-head h1 { font-size: 32px; }
  .foot-grid { grid-template-columns: 1fr; }
  .head-actions .hide-sm { display: none; }
}

/* ════ Banner de consentimiento (Google Consent Mode v2) ════ */
[data-consent-banner] { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: var(--bg-surface); border-top: 1px solid var(--border); padding: 20px; display: none; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
[data-consent-banner].show { display: flex; }
.cb-text { flex: 1; min-width: 200px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.cb-text a { color: var(--blue-400); text-decoration: underline; }
html:not([data-theme="dark"]) .cb-text a { color: var(--blue-600); }
.cb-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cb-btn { font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; transition: background .15s, border-color .15s; }
.cb-btn:hover { border-color: var(--border-strong); background: var(--bg-subtle); }
.cb-btn.accept { background: var(--primary); color: #fff; border-color: var(--primary); }
.cb-btn.accept:hover { background: var(--blue-600); }
@media (max-width: 640px) {
  [data-consent-banner] { flex-direction: column; }
  .cb-text { font-size: 13px; }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1; }
}
