/* =====================================================================
   InmoAlert — Sistema de diseño
   Paleta: tinta nocturna + verde WhatsApp funcional + ámbar de urgencia
   Tipografía: Fraunces (display) + Inter (cuerpo) + JetBrains Mono (datos)
   ===================================================================== */

:root {
    --ink:          #12141C;   /* fondo principal */
    --surface:      #1A1E2A;   /* tarjetas / paneles */
    --surface-2:    #232838;   /* elementos elevados sobre surface */
    --line:         #2E3446;   /* bordes sutiles */
    --text:         #EDEEF3;   /* texto principal */
    --text-muted:   #8B93A8;   /* texto secundario */
    --whatsapp:     #25D366;   /* acción primaria: es literalmente el canal del producto */
    --whatsapp-ink: #0B3D24;
    --amber:        #F2A93B;   /* urgencia / "eres el primero" */
    --danger:       #E15252;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Inter', -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    --radius: 14px;
    --radius-sm: 8px;
    --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    margin: 0 0 0.4em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { color: var(--text-muted); margin: 0 0 1em; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--whatsapp);
}

/* ---------- Navegación ---------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 0;
}
.nav__logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}
.nav__logo span { color: var(--whatsapp); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { text-decoration: none; color: var(--text-muted); font-size: 0.92rem; }
.nav__links a:hover { color: var(--text); }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.94rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--whatsapp); color: #06170E; }
.btn--primary:hover { opacity: 0.92; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-muted); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
    padding: 64px 0 90px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.hero__ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero__proof { margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap; }
.hero__proof div { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.hero__proof strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--text); font-weight: 600; }

/* Teléfono / burbuja de WhatsApp — elemento de firma del sitio */
.phone {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    background: #05070C;
    border: 10px solid #05070C;
    border-radius: 40px;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6), 0 0 0 1px var(--line);
    overflow: hidden;
}
.phone__notch {
    height: 22px; background: #05070C;
    display: flex; align-items: center; justify-content: center;
}
.phone__notch::after { content: ''; width: 70px; height: 8px; background: #12141C; border-radius: 6px; }
.phone__screen {
    background: linear-gradient(180deg, #0B141A, #0B141A 100%);
    min-height: 420px;
    padding: 18px 12px;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(37,211,102,0.05), transparent 40%);
}
.phone__header {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 16px;
}
.phone__avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--whatsapp); display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.phone__header strong { font-size: 0.9rem; color: #E9EDEF; font-family: var(--font-body); }
.phone__header small { display: block; color: #8696A0; font-size: 0.72rem; }

.bubble {
    background: #1F2C34;
    color: #E9EDEF;
    border-radius: 4px 12px 12px 12px;
    padding: 12px 14px;
    max-width: 92%;
    font-size: 0.86rem;
    animation: rise 0.5s ease both;
}
.bubble--me {
    margin-left: auto;
    background: #005C4B;
    border-radius: 12px 4px 12px 12px;
}
.bubble + .bubble { margin-top: 10px; }
.bubble__title { font-weight: 700; margin-bottom: 4px; }
.bubble__price { font-family: var(--font-mono); color: var(--amber); font-weight: 700; }
.bubble__time { display: block; text-align: right; font-size: 0.66rem; color: #8696A0; margin-top: 6px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Secciones ---------- */
section { padding: 70px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { max-width: 620px; margin-bottom: 44px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
}
.card__num { font-family: var(--font-mono); color: var(--whatsapp); font-size: 0.78rem; margin-bottom: 10px; display: block; }

/* ---------- Precios ---------- */
.plan {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.plan--destacado { border-color: var(--whatsapp); box-shadow: 0 0 0 1px var(--whatsapp); position: relative; }
.plan--destacado::before {
    content: 'Más elegido';
    position: absolute; top: -12px; left: 24px;
    background: var(--whatsapp); color: #06170E;
    font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.plan__precio { font-family: var(--font-display); font-size: 2.4rem; color: var(--text); }
.plan__precio span { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { font-size: 0.88rem; color: var(--text-muted); padding-left: 22px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--whatsapp); font-weight: 700; }

/* ---------- Formularios ---------- */
.auth-shell {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
}
.field input:focus, .field select:focus {
    outline: 2px solid var(--whatsapp);
    outline-offset: 1px;
    border-color: transparent;
}
.field--row { display: flex; gap: 12px; }
.field--row > div { flex: 1; }
.hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    margin-bottom: 18px;
}
.alert--error { background: rgba(225,82,82,0.12); border: 1px solid rgba(225,82,82,0.35); color: #F5A5A5; }
.alert--ok { background: rgba(37,211,102,0.1); border: 1px solid rgba(37,211,102,0.3); color: #8DEBB1; }

/* ---------- Dashboard ---------- */
.dash-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0; border-bottom: 1px solid var(--line); margin-bottom: 32px;
}
.badge {
    font-family: var(--font-mono); font-size: 0.72rem; padding: 4px 10px;
    border-radius: 999px; border: 1px solid var(--line); color: var(--text-muted);
}
.badge--activo { color: #8DEBB1; border-color: rgba(37,211,102,0.35); background: rgba(37,211,102,0.08); }
.badge--pausado { color: var(--text-muted); }

.search-row {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; margin-bottom: 12px; gap: 16px; flex-wrap: wrap;
}
.search-row__meta { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.search-row__actions { display: flex; gap: 8px; }
.icon-btn {
    background: var(--surface-2); border: 1px solid var(--line); color: var(--text-muted);
    padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.82rem;
}
.icon-btn:hover { color: var(--text); }
.icon-btn--danger:hover { color: var(--danger); border-color: var(--danger); }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(5,7,12,0.7);
    display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-overlay.abierto { display: flex; }
.modal {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
}

footer { border-top: 1px solid var(--line); padding: 36px 0; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer p { margin: 0; font-size: 0.82rem; }

.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
    border: 1px dashed var(--line); border-radius: var(--radius);
}
