/* ==========================================================================
   Reactiva Colombia — sistema de diseño
   --------------------------------------------------------------------------
   Dignidad, no lástima. El protagonista visual es el producto y la persona
   trabajando, nunca los escombros.

   Móvil primero: todo se diseña a 360 px y crece desde ahí. Sin preprocesador
   ni paso de compilación — el hosting no ejecuta Node, y una web de contenido
   no lo necesita.
   ========================================================================== */

/* --- Tipografías autohospedadas -------------------------------------------
   Si los .woff2 aún no están en assets/fonts/, el navegador cae al siguiente
   tipo de la pila y el sitio se ve bien igual. Ver assets/fonts/LEEME.md.     */

@font-face {
    font-family: 'Outfit';
    src: url('/assets/fonts/outfit-600.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Outfit';
    src: url('/assets/fonts/outfit-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
    /* Color. El azul comunica crecimiento y confianza sin caer en el verde ONG.
       El ámbar aporta calidez y empuja la conversión. El azul del badge se
       separa de la marca a propósito: "verificado" debe leerse como un sello
       independiente, no como decoración. */
    --white:        #ffffff;
    --sand:         #f7f8fb;
    --sand-deep:    #eef1f8;

    --primary:      #1f4fa3;
    --primary-dark: #163d85;
    --primary-soft: #e8eefb;

    --accent:       #e6b422;
    --accent-dark:  #c1911a;
    --accent-soft:  #fff7dc;

    --verified:     #9a6b0f;
    --verified-soft:#fff3cf;

    --ink:          #1c1917;
    --ink-soft:     #57534e;
    --ink-faint:    #8a827c;
    --line:         #e7e5e4;
    --line-soft:    #f0eeec;

    --success:      #16a34a;
    --warning:      #d97706;
    --danger:       #dc2626;
    --danger-soft:  #fef2f2;
    --warning-soft: #fffbeb;
    --success-soft: #f0fdf4;

    /* Tipografía */
    --font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Espaciado en múltiplos de 4 */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
    --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
    --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

    --radius-sm:  8px;
    --radius:     12px;
    --radius-lg:  16px;
    --radius-pill: 9999px;

    /* Sombras de una sola capa. Nada de neomorfismo ni glassmorphism. */
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, .06);
    --shadow:    0 2px 8px rgba(28, 25, 23, .08);
    --shadow-lg: 0 8px 24px rgba(28, 25, 23, .10);

    --container: 1200px;
    --header-h:  56px;
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;               /* nunca por debajo: es el mínimo legible en móvil */
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
}

img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; font-weight: 600; }

p { text-wrap: pretty; }

a { color: var(--primary-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }

ul, ol { padding-left: var(--s5); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s8) 0; }

/* Foco siempre visible: es accesibilidad, no un detalle estético. */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* --- Utilidades ----------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--s4);
}

.container--narrow { max-width: 760px; }
.container--form   { max-width: 520px; }

.section     { padding-block: var(--s16); }
.section--sm { padding-block: var(--s12); }
.section--sand { background: var(--sand); }
.section--teal { background: var(--primary); color: var(--white); }
.section--teal h2 { color: var(--white); }

.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.stack-lg > * + * { margin-top: var(--s6); }

.muted     { color: var(--ink-soft); }
.faint     { color: var(--ink-faint); font-size: 14px; }
.small     { font-size: 14px; }
.tiny      { font-size: 13px; }
.center    { text-align: center; }
.bold      { font-weight: 600; }
.nowrap    { white-space: nowrap; }

.lead { font-size: 18px; color: var(--ink-soft); }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Campo trampa para bots: invisible para las personas, presente en el DOM. */
.hp-field {
    position: absolute; left: -9999px;
    width: 1px; height: 1px; overflow: hidden;
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5;
        stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

/* Enlace de salto al contenido: lo primero que encuentra un lector de pantalla. */
.skip-link {
    position: absolute; left: var(--s4); top: -60px;
    z-index: 200; background: var(--primary); color: var(--white);
    padding: var(--s3) var(--s5); border-radius: var(--radius);
    transition: top .15s;
}
.skip-link:focus { top: var(--s4); color: var(--white); }

/* --- Botones -------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 48px;              /* objetivo táctil cómodo */
    padding: var(--s3) var(--s6);
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); color: var(--white); }

/* El ámbar se reserva para el acto de comprar. Si todo es acento, nada lo es. */
/* Verde WhatsApp: el botón de comprar ES un botón de WhatsApp. */
.btn--buy { background: #25d366; color: #fff; }
.btn--buy:hover { background: #1da851; color: #fff; }
.btn--buy .icon { stroke: #fff; }

.btn--outline { background: transparent; color: var(--primary-dark); border-color: var(--line); }
.btn--outline:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

.btn--ghost { background: transparent; color: var(--ink-soft); min-height: 40px; padding: var(--s2) var(--s4); }
.btn--ghost:hover { background: var(--sand-deep); color: var(--ink); }

.btn--danger { background: var(--danger); color: var(--white); }
.btn--danger:hover { background: #b91c1c; color: var(--white); }

.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: var(--s2) var(--s4); font-size: 14px; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* --- Insignias y chips ---------------------------------------------------- */

.badge {
    display: inline-flex; align-items: center; gap: var(--s1);
    padding: 3px var(--s3);
    border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600; line-height: 1.5;
    white-space: nowrap;
}

.badge--verified { background: var(--verified-soft); color: var(--verified); }
.badge--verified .icon { width: 14px; height: 14px; stroke-width: 2.5; }

.badge--operating  { background: var(--success-soft); color: var(--success); }
.badge--partial    { background: var(--accent-soft);  color: var(--accent-dark); }
.badge--stopped    { background: var(--sand-deep);    color: var(--ink-soft); }
.badge--neutral    { background: var(--sand-deep);    color: var(--ink-soft); }
.badge--danger     { background: var(--danger-soft);  color: var(--danger); }
.badge--warning    { background: var(--warning-soft); color: var(--warning); }
.badge--success    { background: var(--success-soft); color: var(--success); }
.badge--info       { background: var(--primary-soft); color: var(--primary-dark); }

.chip {
    display: inline-flex; align-items: center; gap: var(--s2);
    min-height: 40px; padding: var(--s2) var(--s4);
    border: 1px solid var(--line); border-radius: var(--radius-pill);
    background: var(--white); color: var(--ink-soft);
    font-size: 14px; font-weight: 500; text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.chip.is-active:hover { color: var(--white); }

/* Fila de chips con desplazamiento horizontal: en móvil es más natural que
   apilarlos y ocupar media pantalla. */
.chip-row {
    display: flex; gap: var(--s2);
    overflow-x: auto;
    padding-bottom: var(--s2);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* --- Tarjetas ------------------------------------------------------------- */

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.card--pad { padding: var(--s5); }
.card--flat { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border-color: var(--line-soft); }

.grid { display: grid; gap: var(--s4); }

.grid--businesses { grid-template-columns: 1fr; }
.grid--listings   { grid-template-columns: repeat(2, 1fr); }
.grid--2          { grid-template-columns: 1fr; }
.grid--3          { grid-template-columns: 1fr; }

/* --- Formularios ---------------------------------------------------------- */

.field { margin-bottom: var(--s5); }

.field > label,
.field-label {
    display: block;
    margin-bottom: var(--s2);
    font-weight: 600;
    font-size: 15px;
}

.field-hint {
    display: block;
    margin-top: var(--s1);
    margin-bottom: var(--s2);
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 400;
}

.input, .select, .textarea {
    width: 100%;
    min-height: 48px;
    padding: var(--s3) var(--s4);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    font-size: 16px;               /* menos de 16px hace que iOS haga zoom al enfocar */
    transition: border-color .15s, box-shadow .15s;
}

.textarea { min-height: 120px; padding-block: var(--s3); resize: vertical; line-height: 1.5; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357534e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--s4) center;
    background-size: 18px;
    padding-right: var(--s10);
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--danger); }

.field-error {
    display: block;
    margin-top: var(--s2);
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

.field-counter { float: right; font-weight: 400; color: var(--ink-faint); font-size: 13px; }

.check {
    display: flex; align-items: flex-start; gap: var(--s3);
    padding: var(--s3) 0;
    cursor: pointer;
}
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.check span { font-size: 15px; }

.radio-group { display: grid; gap: var(--s2); }
.radio-group .check {
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: var(--s3) var(--s4);
    align-items: center;
}
.radio-group .check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

fieldset { border: 0; padding: 0; margin: 0 0 var(--s6); }
legend { font-family: var(--font-display); font-weight: 600; font-size: 18px; padding: 0; margin-bottom: var(--s3); }

/* Bloques que separan visualmente lo público de lo privado en el onboarding.
   Que el emprendedor VEA la diferencia es parte de la promesa de privacidad. */
.zone {
    border-radius: var(--radius-lg);
    padding: var(--s5);
    margin-bottom: var(--s6);
}
.zone--public  { background: var(--primary-soft); border: 1px solid #c9e6e0; }
.zone--private { background: var(--sand-deep);    border: 1px solid var(--line); }

.zone-head {
    display: flex; align-items: center; gap: var(--s2);
    font-family: var(--font-display); font-weight: 600; font-size: 16px;
    margin-bottom: var(--s2);
}
.zone--public  .zone-head { color: var(--primary-dark); }
.zone--private .zone-head { color: var(--ink-soft); }
.zone-note { font-size: 14px; margin-bottom: var(--s5); }
.zone--public  .zone-note { color: var(--primary-dark); }
.zone--private .zone-note { color: var(--ink-soft); }

/* --- Avisos --------------------------------------------------------------- */

.alert {
    display: flex; gap: var(--s3);
    padding: var(--s4);
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 15px;
    margin-bottom: var(--s5);
}
.alert .icon { margin-top: 2px; }
.alert--success { background: var(--success-soft); border-color: #bbf7d0; color: #14532d; }
.alert--error   { background: var(--danger-soft);  border-color: #fecaca; color: #7f1d1d; }
.alert--info    { background: var(--primary-soft); border-color: #c9e6e0; color: var(--primary-dark); }
.alert--warning { background: var(--warning-soft); border-color: #fde68a; color: #78350f; }

.alert a { color: inherit; font-weight: 600; }

/* --- Estado vacío --------------------------------------------------------- */

.empty {
    text-align: center;
    padding: var(--s12) var(--s5);
    background: var(--sand);
    border-radius: var(--radius-lg);
}
.empty h3 { margin-bottom: var(--s2); }
.empty p { color: var(--ink-soft); margin-bottom: var(--s5); }

/* --- Paginación ----------------------------------------------------------- */

.pagination {
    display: flex; align-items: center; justify-content: center; gap: var(--s3);
    margin-top: var(--s10);
}
.pagination .page-info { color: var(--ink-soft); font-size: 14px; }

/* --- Cabecera ------------------------------------------------------------- */

.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(140%) blur(6px);
}

.site-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
    height: 100%;
}

.brand {
    display: inline-flex; align-items: center; gap: var(--s2);
    font-family: var(--font-display); font-weight: 700; font-size: 18px;
    color: var(--ink); text-decoration: none;
    letter-spacing: -0.02em;
}
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand:hover { color: var(--primary-dark); }

.site-nav { display: none; }

.site-nav a {
    color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500;
    padding: var(--s2) var(--s3); border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--primary-dark); background: var(--sand); }
.site-nav a.is-active { color: var(--primary-dark); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: var(--s2); }

.menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border: 0; background: transparent; border-radius: var(--radius-sm);
    color: var(--ink);
}
.menu-toggle:hover { background: var(--sand); }

.mobile-menu {
    position: fixed; inset: var(--header-h) 0 0;
    z-index: 99;
    background: var(--white);
    padding: var(--s6) var(--s4);
    overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
    display: block; padding: var(--s4) 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500;
}
.mobile-menu .btn { margin-top: var(--s6); }

/* --- Pie ------------------------------------------------------------------ */

.site-footer {
    background: var(--sand);
    border-top: 1px solid var(--line);
    padding-block: var(--s12) var(--s6);
    margin-top: var(--s16);
}

.site-footer__main {
    display: flex;
    flex-direction: column;
    gap: var(--s6);
    align-items: flex-start;
}

.site-footer__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.site-footer__claim {
    margin-top: var(--s2);
    max-width: 44ch;
    color: var(--ink-soft);
    font-size: 15px;
}

.site-footer__cta {
    display: inline-flex; align-items: center; gap: var(--s2);
    color: var(--primary-dark); font-weight: 600; font-size: 16px;
    text-decoration: none;
    flex: none;
}
.site-footer__cta:hover { text-decoration: underline; }

.site-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    margin-top: var(--s10);
    padding-top: var(--s5);
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 13px;
}

.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--s2); }
.site-footer__legal span { color: var(--line); }
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--primary-dark); text-decoration: underline; }
.site-footer__credit a { font-weight: 600; color: var(--ink-soft); }

@media (min-width: 768px) {
    .site-footer__main {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .site-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* --- Escritorio ----------------------------------------------------------- */

@media (min-width: 400px) {
    .grid--businesses { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    h1 { font-size: 44px; }
    h2 { font-size: 32px; }
    h3 { font-size: 22px; }

    .container { padding-inline: var(--s6); }
    .section     { padding-block: var(--s24); }
    .section--sm { padding-block: var(--s16); }

    .site-nav { display: flex; align-items: center; gap: var(--s1); }
    .menu-toggle { display: none; }

    .grid--listings { grid-template-columns: repeat(3, 1fr); }
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .grid--businesses { grid-template-columns: repeat(3, 1fr); }
    .grid--listings   { grid-template-columns: repeat(4, 1fr); }
    .grid { gap: var(--s6); }
}

@media (min-width: 1280px) {
    .grid--businesses { grid-template-columns: repeat(4, 1fr); }
}
