/*
 * landing-base.css — base compartilhada das landing pages de unidade.
 * Cores vêm de variáveis definidas no <head> a partir de config/landing-*.php (marca → cores).
 * Conteúdo: reset, tipografia, botões, cabeçalho, formulário, diálogos, rodapé e utilitários.
 */

:root {
    --lp-font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --lp-header-h: 64px;
    --lp-gutter: clamp(16px, 4vw, 40px);
    --lp-max: 1240px;
    --lp-radius: 12px;
    --lp-radius-sm: 10px;
    --lp-erro: #ff8a91;
    --lp-sucesso: #5be39a;
    color-scheme: dark;
}

@media (min-width: 900px) {
    :root { --lp-header-h: 76px; }
}

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

html {
    background: var(--lp-bg);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--lp-header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html.lp-travado { overflow: hidden; }

body.lp {
    margin: 0;
    min-width: 280px;
    background: var(--lp-bg);
    color: var(--lp-text);
    font-family: var(--lp-font);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reset com :where() — especificidade zero, para as classes dos componentes sempre vencerem. */
:where(.lp) :where(h1, h2, h3, p, ul, ol, dl, dd, figure) { margin: 0; }
:where(.lp) :where(ul, ol) { padding: 0; }
:where(.lp) :where(img, svg) { display: block; max-width: 100%; }
:where(.lp) img { height: auto; }
:where(.lp) a { color: inherit; }
:where(.lp) :where(button, input) { font: inherit; color: inherit; }
.lp [hidden] { display: none !important; }

.lp :focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Utilitários ─────────────────────────────────────────────────────────── */

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

.lp-skip {
    position: absolute;
    top: -120px;
    left: 16px;
    z-index: 300;
    padding: 12px 18px;
    border-radius: 8px;
    background: #fff;
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.lp-skip:focus { top: 12px; }

.lp-container {
    width: 100%;
    max-width: calc(var(--lp-max) + 2 * var(--lp-gutter));
    margin-inline: auto;
    padding-inline: var(--lp-gutter);
}

.lp-icone { flex: none; }

/* ── Tipografia e seções ─────────────────────────────────────────────────── */

.lp-section { padding-block: clamp(56px, 8vw, 112px); }
.lp-section__head { margin-bottom: clamp(28px, 4vw, 48px); }

.lp-eyebrow {
    margin-bottom: 12px;
    color: var(--lp-accent-text);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.lp-title {
    font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.875rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.1;
    text-wrap: balance;
}

.lp-lead {
    max-width: 60ch;
    margin-top: 16px;
    color: var(--lp-muted);
    font-size: clamp(1rem, .95rem + .3vw, 1.125rem);
}

.lp-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.lp-aviso {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--lp-radius);
    background: var(--lp-surface);
    color: var(--lp-muted);
}

.lp-aviso .lp-icone { margin-top: 2px; color: var(--lp-accent-text); }
.lp-aviso a { color: var(--lp-text); text-underline-offset: 3px; }

/* ── Botões ──────────────────────────────────────────────────────────────── */

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--lp-radius-sm);
    background: none;
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

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

.lp-btn--primary { background: var(--lp-accent); border-color: var(--lp-accent); }
.lp-btn--primary:hover { background: var(--lp-accent-hover); border-color: var(--lp-accent-hover); }

.lp-btn--ghost {
    border-color: rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lp-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .18); }

.lp-btn--outline { border-color: rgba(255, 255, 255, .34); }
.lp-btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.lp-btn--sm { min-height: 44px; padding: 8px 16px; font-size: .875rem; }
.lp-btn--lg { min-height: 54px; padding: 14px 28px; font-size: 1rem; }
.lp-btn--block { width: 100%; }

.lp-btn[disabled] { cursor: progress; opacity: .8; }

.lp-link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.lp-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lp-gira .7s linear infinite;
}

.is-enviando .lp-spinner { display: inline-block; }

@keyframes lp-gira { to { transform: rotate(360deg); } }

/* ── Cabeçalho ───────────────────────────────────────────────────────────── */

.lp-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--lp-header-h);
    background: linear-gradient(180deg, rgba(var(--lp-bg-rgb), .88), rgba(var(--lp-bg-rgb), 0));
    transition: background-color .25s ease, box-shadow .25s ease;
}

.lp-header.is-scrolled,
.lp-header.is-open {
    background: rgba(var(--lp-bg-rgb), .94);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .09);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.lp-header__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-right: auto;
    text-decoration: none;
}

.lp-brand__logo { width: auto; height: 44px; }

.lp-brand__text { display: flex; flex-direction: column; line-height: 1.15; }

.lp-brand__name {
    font-size: .9375rem;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.lp-brand__unit {
    color: var(--lp-accent-text);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.lp-header__cta { display: none; }

.lp-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--lp-radius-sm);
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
}

.lp-menu-toggle__fechar { display: none; }
.lp-header.is-open .lp-menu-toggle__abrir { display: none; }
.lp-header.is-open .lp-menu-toggle__fechar { display: block; }

.lp-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--lp-header-h));
    max-height: calc(100dvh - var(--lp-header-h));
    padding: 4px var(--lp-gutter) 20px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: rgba(var(--lp-bg-rgb), .98);
}

.lp-header.is-open .lp-nav { display: block; }

.lp-nav__list { display: flex; flex-direction: column; list-style: none; }

.lp-nav__link {
    display: flex;
    align-items: center;
    min-height: 52px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-weight: 600;
    text-decoration: none;
}

.lp-nav__cta { margin-top: 18px; }

@media (min-width: 480px) {
    .lp-header__cta { display: inline-flex; }
    .lp-nav__cta { display: none; }
}

@media (min-width: 900px) {
    .lp-header__inner { gap: 20px; }
    .lp-brand__logo { height: 52px; }
    .lp-brand__name { font-size: 1rem; }
    .lp-menu-toggle { display: none; }

    .lp-nav,
    .lp-header.is-open .lp-nav {
        display: block;
        position: static;
        max-height: none;
        padding: 0;
        overflow: visible;
        border: 0;
        background: none;
    }

    .lp-nav__list { flex-direction: row; align-items: center; gap: 4px; }

    .lp-nav__link {
        min-height: 44px;
        padding: 0 14px;
        border: 0;
        border-radius: 8px;
        color: rgba(255, 255, 255, .88);
        font-size: .9375rem;
        transition: background-color .2s ease, color .2s ease;
    }

    .lp-nav__link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
}

/* ── Cadastro ────────────────────────────────────────────────────────────── */

.lp-novidades {
    position: relative;
    border-block: 1px solid rgba(255, 255, 255, .07);
    background:
        radial-gradient(900px 460px at 88% -10%, rgba(var(--lp-accent-rgb), .26), rgba(var(--lp-accent-rgb), 0) 70%),
        var(--lp-surface);
}

.lp-novidades__grid { display: grid; gap: 32px; }

@media (min-width: 900px) {
    .lp-novidades__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
        gap: clamp(40px, 6vw, 88px);
        align-items: center;
    }
}

.lp-form-card {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(var(--lp-bg-rgb), .78);
}

.lp-form { display: grid; gap: 18px; }

.lp-label {
    display: block;
    margin-bottom: 8px;
    font-size: .875rem;
    font-weight: 600;
}

.lp-input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #7a7a7a;
    border-radius: var(--lp-radius-sm);
    background: rgba(255, 255, 255, .05);
    color: var(--lp-text);
    font-size: 1rem;
    transition: border-color .2s ease, background-color .2s ease;
}

.lp-input::placeholder { color: #9a9a9a; opacity: 1; }
.lp-input:hover { border-color: #b5b5b5; }

.lp-input:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    border-color: #fff;
    border-radius: var(--lp-radius-sm);
}

.lp-field.is-invalido .lp-input { border-color: var(--lp-erro); }

.lp-field__erro {
    margin-top: 8px;
    color: var(--lp-erro);
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.4;
}

.lp-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: .9375rem;
    line-height: 1.45;
    cursor: pointer;
}

.lp-check__input {
    flex: none;
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--lp-accent);
    cursor: pointer;
}

.lp-field.is-invalido .lp-check__input { outline: 2px solid var(--lp-erro); outline-offset: 2px; }

/* Campo-armadilha contra robôs: fora da tela e fora da navegação. */
.lp-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lp-form__falha {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid rgba(var(--lp-accent-rgb), .6);
    border-radius: var(--lp-radius-sm);
    background: rgba(var(--lp-accent-rgb), .16);
    font-size: .9375rem;
    line-height: 1.45;
}

.lp-form__falha .lp-icone { margin-top: 1px; color: var(--lp-erro); }

.lp-form__legal {
    color: var(--lp-muted);
    font-size: .8125rem;
    line-height: 1.55;
}

.lp-form__legal a { text-underline-offset: 3px; }

.lp-form__sucesso {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 28px 8px;
    text-align: center;
}

.lp-form__sucesso:focus { outline: none; }

.lp-form__sucesso-icone {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(91, 227, 154, .16);
    color: var(--lp-sucesso);
}

.lp-form__sucesso-texto {
    max-width: 34ch;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.45;
}

.lp-form__sucesso--compacto { padding: 8px 0 4px; }
.lp-form__sucesso--compacto .lp-form__sucesso-texto { font-size: 1rem; }

/* ── Diálogos ────────────────────────────────────────────────────────────── */

.lp-dialog {
    width: min(880px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: var(--lp-text);
}

.lp-dialog--sm { width: min(480px, calc(100vw - 24px)); }

.lp-dialog::backdrop {
    background: rgba(0, 0, 0, .8);
}

.lp-dialog[open] { animation: lp-dialog-entra .22s ease-out; }

@keyframes lp-dialog-entra {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

.lp-dialog__box {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: var(--lp-surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}

.lp-dialog__rolagem,
.lp-dialog__corpo {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.lp-dialog__corpo { padding: 28px 24px 24px; }

.lp-dialog__fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 50%;
    background: rgba(0, 0, 0, .66);
    cursor: pointer;
    transition: background-color .2s ease;
}

.lp-dialog__fechar:hover { background: #000; }

.lp-dialog__titulo {
    padding-right: 44px;
    margin-bottom: 14px;
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.2;
}

.lp-dialog__texto { color: var(--lp-muted); font-size: .9375rem; }
.lp-dialog__texto + .lp-dialog__texto { margin-top: 12px; }
.lp-dialog__texto--menor { margin-top: 16px; font-size: .8125rem; }
.lp-dialog__texto a { color: var(--lp-text); text-underline-offset: 3px; }

/* ── Rodapé ──────────────────────────────────────────────────────────────── */

.lp-footer {
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: var(--lp-bg);
    font-size: .9375rem;
}

.lp-footer__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px clamp(32px, 6vw, 80px);
}

.lp-footer__marca {
    display: flex;
    flex: 1 1 240px;
    gap: 14px;
    align-items: center;
    align-self: flex-start;
}

.lp-footer__logo { width: auto; height: 64px; }

.lp-footer__nome { display: flex; flex-direction: column; line-height: 1.3; }
.lp-footer__nome strong { font-size: 1.0625rem; font-weight: 800; }
.lp-footer__nome span { color: var(--lp-muted); font-size: .875rem; }

.lp-footer__titulo {
    margin-bottom: 10px;
    color: var(--lp-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.lp-footer__lista { display: grid; list-style: none; }

.lp-footer__lista a,
.lp-footer__lista .lp-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    min-height: 40px;
    text-decoration: none;
}

.lp-footer__lista a:hover,
.lp-footer__lista .lp-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.lp-footer__redes { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }

.lp-footer__redes a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--lp-radius-sm);
    transition: background-color .2s ease, border-color .2s ease;
}

.lp-footer__redes a:hover { border-color: var(--lp-accent); background: var(--lp-accent); }

.lp-footer__base {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    justify-content: space-between;
    margin-top: 40px;
    padding-block: 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: #a8a8a8;
    font-size: .8125rem;
}

/* ── Entrada suave ao rolar (só com JavaScript; some com "reduzir movimento") ─ */

.lp-js [data-lp-revelar] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.lp-js [data-lp-revelar].is-visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .lp *, .lp *::before, .lp *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .lp .lp-spinner {
        animation-duration: 1.4s !important;
        animation-iteration-count: infinite !important;
    }

    .lp-js [data-lp-revelar] { opacity: 1; transform: none; }
}
