/* Pilar Solution · estilos base. Identidad B "Plano de barrio": Sora (títulos) + Inter (textos), azul plano. */
@font-face { font-family: "Inter"; src: url("../fonts/site/inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Sora"; src: url("../fonts/site/sora.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Sora", "Inter", system-ui, sans-serif;
  --w-head: 700;
  --bg: #F4F6FA; --surface: #FFFFFF; --ink: #0E1A33; --muted: #4F5B73; --line: #DEE3EC;
  --brand: #2350E6; --brand-ink: #FFFFFF; --brand-soft: #E6ECFD; --brand-hover: #1B40BD; --navy: #0E1A33; --accent: #FF8A3D;
  --ok: #0B8457; --ok-soft: #E2F4EC; --warn: #9A5B00; --warn-soft: #FFF2D9; --danger: #D23F44; --danger-soft: #FCE8E9;
  --c-profesionales: #2350E6; --c-comercios: #C2620A; --c-inmobiliarias: #6B4FD8; --c-propiedades: #0B8457; --c-clasificados: #D23F44; --c-noticias: #0F7490;
  --r: 12px; --r-btn: 10px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --shadow: 0 1px 2px rgba(14, 26, 51, .06), 0 4px 16px rgba(14, 26, 51, .06);
  --max: 1120px; --nav-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(26px, 6vw, 40px); font-weight: var(--w-head); }
h2 { font-size: clamp(20px, 4.5vw, 26px); font-weight: var(--w-head); }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 100; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 10px 14px; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
.narrow { max-width: 560px; }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s6); }
.row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }

/* Aviso de versión de prueba */
.demo-bar { background: #2B2B2B; color: #fff; font-size: 13px; text-align: center; padding: 6px var(--s4); }
.demo-bar strong { color: #FFD66B; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: var(--s4); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.brand svg { flex: none; }
.brand b { color: var(--brand); font-weight: 600; }
.main-nav { display: none; gap: var(--s1); margin-left: var(--s4); }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); background: var(--brand-soft); }
.header-actions { margin-left: auto; display: flex; gap: var(--s2); align-items: center; }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); border: 0; text-decoration: none; }

/* Barra inferior en el celular */
.bottom-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; min-height: 48px; justify-content: center; }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav .publish span.plus { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: var(--shadow); }
main { padding: var(--s5) 0 var(--s7); min-height: 60vh; }

/* Pie */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: var(--s6) 0 calc(var(--nav-h) + var(--s6)); font-size: 14px; color: var(--muted); }
.site-footer .cols { display: grid; gap: var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.site-footer h3 { font-size: 14px; color: var(--ink); margin-bottom: var(--s2); }
.site-footer a { color: var(--muted); text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--ink); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-btn); border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-google { background: #fff; color: #1f1f1f; border-color: var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Tarjetas y paneles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.card-tight { padding: var(--s4); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { padding: var(--s3) 0; border-top: 1px solid var(--line); display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; padding-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tile { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); min-height: 112px; }
.tile:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.tile strong { font-size: 15.5px; }
.tile span { font-size: 13.5px; color: var(--muted); }
.ico-badge { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); flex: none; }

/* Etiquetas */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: #EEF1F6; color: var(--muted); }

/* Avisos */
.notice { padding: var(--s3) var(--s4); border-radius: var(--r); font-size: 15px; border: 1px solid transparent; }
.notice-ok { background: var(--ok-soft); color: #1c4d30; border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.notice-warn { background: var(--warn-soft); color: #6b3f00; border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.notice-error { background: var(--danger-soft); color: #7a2a18; border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.notice ul { margin: 6px 0 0; padding-left: 18px; }

/* Formularios */
form { margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 15px; }
.hint { font-size: 13.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-input { letter-spacing: .2em; text-transform: uppercase; font-weight: 800; text-align: center; font-size: 22px; }

/* Encabezado de página */
.page-head { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s5); }
.page-head p { color: var(--muted); font-size: 17px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s3); }
.steps li { counter-increment: s; display: flex; gap: var(--s3); align-items: flex-start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; flex: none; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.prose { font-size: 16.5px; line-height: 1.7; }
.prose h2 { font-size: 21px; margin: var(--s6) 0 var(--s2); }
.prose p, .prose ul { margin: 0 0 var(--s3); }
.prose ul { padding-left: 20px; }
.copy-box { display: flex; gap: var(--s2); }
.copy-box .input { font-size: 16px; }
.confirm-box { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }

@media (max-width: 479px) { .hide-mobile { display: none !important; } }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .main-nav { display: flex; }
  .bottom-nav { display: none; }
  main { padding-bottom: var(--s8); }
  .site-footer { padding-bottom: var(--s6); }
  .container { padding: 0 var(--s5); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
