/*
 * Habitaria — tokens visuais compartilhados (site, guia e estúdio).
 * Reutilize estas variáveis; não crie cores soltas nas folhas de estilo de cada área.
 * Paleta própria (índigo + âmbar solar + turquesa de brisa), deliberadamente distinta das marcas de incorporadoras.
 */
@font-face {
    font-family: "Bricolage Grotesque";
    src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-stretch: 75% 100%;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("/fonts/inter-italic-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

:root {
    color-scheme: light;

    /* Superfícies e texto */
    --hb-paper: #f6f4ef;        /* fundo da página */
    --hb-surface: #ffffff;      /* cartões */
    --hb-soft: #eeebe3;         /* áreas recuadas, trilhos */
    --hb-line: #dfdacf;         /* bordas */
    --hb-ink: #151a2d;          /* texto principal */
    --hb-muted: #5a6074;        /* texto secundário */
    --hb-night: #0f1424;        /* fundos escuros (palco 3D, rodapé) */

    /* Marca */
    --hb-primary: #2c3a8c;      /* índigo Habitaria */
    --hb-primary-strong: #222e73;
    --hb-primary-soft: #e5e8f6;
    --hb-on-primary: #ffffff;

    /* Semântica do guia */
    --hb-sun: #e9970f;          /* sol / insolação */
    --hb-sun-soft: #fcefd2;
    --hb-breeze: #138f9c;       /* vento / ventilação */
    --hb-breeze-soft: #d3eff1;
    --hb-home: #e2434b;         /* "seu apê" em destaque */
    --hb-home-soft: #fbe1e2;
    --hb-leaf: #3a8655;         /* áreas verdes, lazer */
    --hb-leaf-soft: #dcefe2;
    --hb-water: #3b7fc4;        /* água, rios */
    --hb-park: #8a5cc2;         /* vagas / estacionamento */

    /* Avaliações */
    --hb-good: #2c8a56;
    --hb-mid: #b07418;
    --hb-low: #c03d36;

    /* Forma */
    --hb-radius-sm: 8px;
    --hb-radius: 14px;
    --hb-radius-lg: 22px;
    --hb-radius-pill: 999px;
    --hb-shadow-sm: 0 1px 2px rgba(21, 26, 45, .06);
    --hb-shadow: 0 1px 2px rgba(21, 26, 45, .06), 0 12px 32px rgba(21, 26, 45, .10);
    --hb-shadow-lg: 0 2px 6px rgba(21, 26, 45, .08), 0 24px 60px rgba(21, 26, 45, .16);
    --hb-focus: 0 0 0 3px rgba(44, 58, 140, .35);

    /* Tipografia */
    --hb-font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
    --hb-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --hb-font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
    --hb-text-xs: .75rem;
    --hb-text-sm: .875rem;
    --hb-text-md: 1rem;
    --hb-text-lg: 1.125rem;
    --hb-text-xl: 1.375rem;
    --hb-text-2xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
    --hb-text-3xl: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);

    /* Espaçamento */
    --hb-space-1: 4px;
    --hb-space-2: 8px;
    --hb-space-3: 12px;
    --hb-space-4: 16px;
    --hb-space-5: 24px;
    --hb-space-6: 32px;
    --hb-space-7: 48px;
    --hb-space-8: 72px;
    --hb-gutter: 16px;          /* margem lateral mínima no celular */
    --hb-max: 1180px;           /* largura máxima de conteúdo do site */

    --hb-ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --hb-paper: #0d1120;
        --hb-surface: #151b2f;
        --hb-soft: #1b2238;
        --hb-line: #2a3350;
        --hb-ink: #e8ebf5;
        --hb-muted: #a3aac0;
        --hb-night: #080b16;
        --hb-primary: #8f9cf0;
        --hb-primary-strong: #aab4f5;
        --hb-primary-soft: #232c52;
        --hb-on-primary: #0d1120;
        --hb-sun: #f4b13d;
        --hb-sun-soft: #3a2e14;
        --hb-breeze: #45c4d1;
        --hb-breeze-soft: #11313a;
        --hb-home: #ff6a70;
        --hb-home-soft: #3d1a20;
        --hb-leaf: #63b884;
        --hb-leaf-soft: #15301f;
        --hb-water: #6fa8e3;
        --hb-park: #b08ae0;
        --hb-good: #5cc08a;
        --hb-mid: #e3a73c;
        --hb-low: #f07b70;
        --hb-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --hb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .4);
        --hb-shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
        --hb-focus: 0 0 0 3px rgba(143, 156, 240, .45);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --hb-paper: #0d1120;
    --hb-surface: #151b2f;
    --hb-soft: #1b2238;
    --hb-line: #2a3350;
    --hb-ink: #e8ebf5;
    --hb-muted: #a3aac0;
    --hb-night: #080b16;
    --hb-primary: #8f9cf0;
    --hb-primary-strong: #aab4f5;
    --hb-primary-soft: #232c52;
    --hb-on-primary: #0d1120;
    --hb-sun: #f4b13d;
    --hb-sun-soft: #3a2e14;
    --hb-breeze: #45c4d1;
    --hb-breeze-soft: #11313a;
    --hb-home: #ff6a70;
    --hb-home-soft: #3d1a20;
    --hb-leaf: #63b884;
    --hb-leaf-soft: #15301f;
    --hb-water: #6fa8e3;
    --hb-park: #b08ae0;
    --hb-good: #5cc08a;
    --hb-mid: #e3a73c;
    --hb-low: #f07b70;
    --hb-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --hb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .4);
    --hb-shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .5);
    --hb-focus: 0 0 0 3px rgba(143, 156, 240, .45);
}

/* Base mínima comum */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--hb-paper);
    color: var(--hb-ink);
    font-family: var(--hb-font-body);
    font-size: var(--hb-text-md);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--hb-focus); border-radius: var(--hb-radius-sm); }
[hidden] { display: none !important; }
.hb-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
