/* =============================================================================
   Portal Inmobiliario — sistema base
   Los colores de marca vienen del panel (theme.primary_color / secondary_color)
   y se inyectan como --brand y --stake en el <head>.
   ========================================================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../vendor/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("../vendor/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --brand: #0F4C5C;          /* sobrescrito desde el panel */
    --stake: #E36414;          /* naranja de estaca topográfica: solo para resaltar */
    --paper: #F6F8F7;
    --surface: #FFFFFF;
    --line: #C5D2D0;
    --line-soft: #E1E8E6;
    --ink: #1A2A2E;
    --ink-muted: #56676B;
    --danger: #B42318;
    --success: #1F7A4D;

    --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 18px;

    /* Escala tipográfica 1.25 */
    --fs-xs: .8rem;
    --fs-sm: .875rem;
    --fs-base: 1rem;
    --fs-md: 1.25rem;
    --fs-lg: 1.563rem;
    --fs-xl: 1.953rem;
    --fs-2xl: 2.441rem;

    /* Puente con las variables de Bootstrap */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-primary: var(--brand);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius);
    --bs-focus-ring-color: color-mix(in srgb, var(--stake) 35%, transparent);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--paper); line-height: 1.55; }
h1, h2, h3, h4, .font-head { font-family: var(--font-head); letter-spacing: -0.015em; color: var(--ink); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* Foco visible y consistente (teclado) */
:focus-visible { outline: 3px solid var(--stake); outline-offset: 2px; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 18%, transparent);
}

/* ---------------------------------------------------------------- botones */
.btn { font-weight: 600; border-radius: var(--radius); padding: .7rem 1.1rem; }
.btn-brand { --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: color-mix(in srgb, var(--brand) 85%, #000); --bs-btn-hover-border-color: transparent;
    --bs-btn-active-bg: color-mix(in srgb, var(--brand) 75%, #000); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-ghost { --bs-btn-color: var(--ink); --bs-btn-bg: transparent; --bs-btn-border-color: var(--line);
    --bs-btn-hover-bg: var(--surface); --bs-btn-hover-border-color: var(--ink-muted); --bs-btn-hover-color: var(--ink); }
.btn-lg { padding: .85rem 1.25rem; font-size: var(--fs-base); }

/* ---------------------------------------------------------------- formularios */
.form-label { font-weight: 600; font-size: var(--fs-sm); margin-bottom: .35rem; color: var(--ink); }
.form-control, .form-select { border-color: var(--line); border-radius: var(--radius-sm); padding: .65rem .8rem; min-height: 46px; background-color: var(--surface); }
.form-control::placeholder { color: #93A1A4; }
.form-text { color: var(--ink-muted); font-size: var(--fs-xs); }
.is-invalid { border-color: var(--danger) !important; }
.invalid-feedback { color: var(--danger); font-size: var(--fs-xs); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.field-password { position: relative; }
.field-password .form-control { padding-right: 3rem; }
.field-password .reveal { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--ink-muted); width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm); }
.field-password .reveal:hover { color: var(--ink); background: var(--line-soft); }

.strength { height: 4px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: .45rem; }
.strength > span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s ease, background-color .2s ease; }
.strength[data-level="2"] > span { background: #C27C0E; }
.strength[data-level="3"] > span, .strength[data-level="4"] > span { background: var(--success); }

/* ---------------------------------------------------------------- avisos */
.notice { border-radius: var(--radius); padding: .8rem 1rem; font-size: var(--fs-sm); border: 1px solid; display: flex; gap: .6rem; align-items: flex-start; }
.notice i { margin-top: .2rem; }
.notice-success { background: #EEF7F1; border-color: #BFE0CC; color: #14532D; }
.notice-error { background: #FDF0EF; border-color: #F2C6C1; color: #7A1A12; }
.notice-info { background: color-mix(in srgb, var(--brand) 7%, #fff); border-color: color-mix(in srgb, var(--brand) 25%, #fff); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
