/* ============================================================
   Banco da Amazônia — SAC
   Design system conforme brandcenter.bancoamazonia.com.br
   ============================================================ */

:root {
    /* Primárias */
    --verde-escuro: #003C2D;
    --verde-claro: #00E12D;
    --verde-neon: #E6FF55;
    --branco: #FFFFFF;

    /* Secundárias */
    --verde-musgo: #416214;
    --verde-cipo: #7D8C4B;
    --verde-argila: #B9C88C;
    --areia: #F5F5C8;

    /* Referência digital */
    --verde-escuro-2: #002724;
    --verde-neon-digital: #00D84F;
    --verde-neon-digital-hover: #00B843;
    --verde-light: #C5FFD8;
    --cinza-claro: #F7F7F7;
    --cinza-padrao: #C5C5C5;
    --cinza-escuro: #7A7A7A;

    /* Semânticos */
    --fundo: var(--areia);
    --superficie: var(--branco);
    --texto: #1E1E1E;
    --texto-suave: #4A4A4A;
    --borda: #D6DCC4;
    --foco: rgba(0, 60, 45, 0.25);

    /* ponytail: o manual não define cor de erro — mantido um vermelho AA sobre branco */
    --erro: #BA1A1A;
    --erro-fundo: #FFF0EE;

    --fonte: 'Inter Tight', Arial, Helvetica, sans-serif;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 20px;

    --sombra: 0 10px 30px rgba(0, 60, 45, 0.08);
    --sombra-alta: 0 16px 40px rgba(0, 60, 45, 0.14);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--fundo);
    color: var(--texto);
    font-family: var(--fonte);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
}

/* ---------- Grafismo da marca ----------
   Releitura das texturas naturais: linhas de espessura e opacidade
   progressivas, transmitindo ascendência e reverberação. */
.grafismo {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 190%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300' fill='none'%3E%3Cg stroke='%2300E12D'%3E%3Cpath d='M400 12C300 12 232 66 192 138 152 210 84 264-16 264' stroke-width='3' stroke-opacity='.20'/%3E%3Cpath d='M400 52C305 52 240 104 202 172 164 240 99 292 4 292' stroke-width='2.2' stroke-opacity='.15'/%3E%3Cpath d='M400 92C310 92 249 141 213 205 177 269 116 318 26 318' stroke-width='1.6' stroke-opacity='.11'/%3E%3Cpath d='M400 130C315 130 257 176 223 236 189 296 131 342 46 342' stroke-width='1.1' stroke-opacity='.08'/%3E%3Cpath d='M400 166C320 166 265 209 233 265 201 321 146 364 66 364' stroke-width='0.8' stroke-opacity='.05'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--verde-escuro);
    overflow: hidden;
}

.site-header .grafismo {
    background-size: auto 100%;
    background-position: right top;
    opacity: 0.7;
}

.header-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    /* área de proteção da marca: padding ≈ 60% da altura da logo */
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-divider {
    width: 1px;
    align-self: stretch;
    background-color: rgba(255, 255, 255, 0.25);
}

.header-title {
    color: var(--branco);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8125rem;
    font-weight: 400;
}

.header-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
}

.header-tag .material-symbols-outlined {
    color: var(--verde-neon);
}

/* ---------- Layout ---------- */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.screen {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* utilitárias alternadas pelo script.js nas transições de tela */
.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.scale-95 {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.span-2 {
    grid-column: 1 / -1;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ---------- Tipografia ---------- */
.page-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.page-heading h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--verde-escuro);
    margin-bottom: 0.75rem;
}

.page-heading p {
    color: var(--texto-suave);
    font-size: 1.0625rem;
    max-width: 34rem;
    margin: 0 auto;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--verde-escuro);
}

.label-base {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--verde-escuro);
}

.label-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--texto-suave);
    margin-left: 0.25rem;
}

.req {
    color: var(--erro);
}

.hint {
    font-size: 0.75rem;
    color: var(--texto-suave);
    margin-top: 0.5rem;
}

/* ---------- Cards de escolha (menu inicial) ---------- */
.cards-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: 46rem;
    margin: 0 auto;
}

.card-choice {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    min-height: 16rem;
    text-align: left;
    font-family: inherit;
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 2rem;
    box-shadow: var(--sombra);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card-choice:hover {
    border-color: var(--verde-escuro);
    box-shadow: var(--sombra-alta);
    transform: translateY(-2px);
}

.card-choice-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background-color: var(--verde-argila);
    color: var(--verde-escuro);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.card-choice:hover .card-choice-icon {
    background-color: var(--verde-escuro);
    color: var(--branco);
}

.card-choice h3 {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--verde-escuro);
    margin-bottom: 0.5rem;
}

.card-choice p {
    font-size: 0.875rem;
    color: var(--texto-suave);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--verde-escuro);
    border-radius: var(--r-lg);
    padding: 2.75rem;
    color: var(--branco);
    box-shadow: var(--sombra);
    margin-bottom: 2.5rem;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 40rem;
}

.hero-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--verde-neon);
    margin-bottom: 0.875rem;
}

.hero h1 {
    font-size: clamp(1.875rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 34rem;
}

/* ---------- Seções do formulário ---------- */
.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-card {
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 2.25rem;
    box-shadow: var(--sombra);
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.section-card-header .material-symbols-outlined {
    color: var(--verde-musgo);
}

/* ---------- Campos ---------- */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.field-base {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--texto);
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-md);
    padding: 0.75rem 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-base::placeholder {
    color: var(--cinza-escuro);
}

select.field-base {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23003C2D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 1.125rem;
}

textarea.field-base {
    resize: vertical;
    min-height: 8rem;
    line-height: 1.6;
}

.field-base:focus {
    outline: none;
    border-color: var(--verde-escuro);
    box-shadow: 0 0 0 3px var(--foco);
}

.field-base:disabled {
    background-color: var(--cinza-claro);
    color: var(--cinza-escuro);
    cursor: not-allowed;
}

/* ---------- Validação (seletores usados pelo script.js) ---------- */
.error-msg {
    display: none;
    color: var(--erro);
    font-size: 0.75rem;
    font-weight: 500;
}

.input-group.invalid .field-base {
    border-color: var(--erro);
    background-color: var(--erro-fundo);
}

.input-group.invalid .error-msg {
    display: block;
}

/* mensagem de erro fora de .input-group (LGPD) — visibilidade via .hidden */
.alert-msg {
    color: var(--erro);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ---------- Radio / checkbox ---------- */
.radio-set {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.radio-label,
.check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.check-label {
    align-items: flex-start;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--texto-suave);
}

input[type="radio"],
input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    accent-color: var(--verde-escuro);
    cursor: pointer;
}

input[type="checkbox"] {
    margin-top: 0.2rem;
}

/* ---------- Painéis internos ---------- */
.panel {
    background-color: rgba(185, 200, 140, 0.35);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-sand {
    background-color: var(--areia);
}

/* ---------- Anexos ---------- */
.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px dashed var(--verde-cipo);
    border-radius: var(--r-lg);
    background-color: var(--areia);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dropzone:hover {
    background-color: var(--verde-argila);
    border-color: var(--verde-escuro);
}

.dropzone:focus-within {
    border-color: var(--verde-escuro);
    box-shadow: 0 0 0 3px var(--foco);
}

.dropzone-btn {
    background-color: var(--verde-escuro);
    color: var(--branco);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--r-md);
    pointer-events: none;
}

.dropzone-msg {
    font-size: 0.875rem;
    color: var(--texto-suave);
}

.dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-md);
    padding: 0.625rem 1rem;
}

.file-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--erro);
    cursor: pointer;
    border-radius: var(--r-sm);
}

.file-remove:hover {
    text-decoration: underline;
}

/* ---------- Botões ---------- */
.btn-primary,
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    border: none;
    border-radius: var(--r-md);
    cursor: pointer;
    box-shadow: var(--sombra);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
    background-color: var(--verde-escuro);
    color: var(--branco);
    font-size: 1.0625rem;
    padding: 1rem 2.5rem;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--verde-escuro-2);
    transform: translateY(-2px);
}

.btn-cta {
    background-color: var(--verde-neon-digital);
    color: var(--verde-escuro);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.8125rem 2rem;
}

.btn-cta:hover:not(:disabled) {
    background-color: var(--verde-neon-digital-hover);
    transform: translateY(-2px);
}

.btn-primary:disabled,
.btn-cta:disabled {
    background-color: var(--cinza-padrao);
    color: var(--texto-suave);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-link {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--verde-escuro);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--r-sm);
}

.btn-link:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 0.5rem;
}

.form-actions-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 32rem;
    font-size: 0.875rem;
    color: var(--texto-suave);
}

.form-actions-note .material-symbols-outlined {
    color: var(--verde-musgo);
    flex-shrink: 0;
}

/* ---------- Consulta de protocolo ---------- */
.consulta-card {
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 2rem;
    box-shadow: var(--sombra);
    max-width: 34rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.consulta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.consulta-result {
    margin-top: 2rem;
}

.result-card {
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 1.75rem;
    box-shadow: var(--sombra);
    max-width: 34rem;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-card.erro {
    background-color: var(--erro-fundo);
    border-color: var(--erro);
    color: var(--erro);
    font-weight: 500;
}

.destaque {
    color: var(--verde-musgo);
    font-weight: 700;
}

/* ---------- Mensagens de status ---------- */
.status-message {
    max-width: 34rem;
    margin: 2rem auto 0;
    border-radius: var(--r-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--borda);
}

.status-message.success {
    background-color: var(--verde-light);
    border-color: var(--verde-neon-digital);
    color: var(--verde-escuro);
}

.status-message.error {
    background-color: var(--erro-fundo);
    border-color: var(--erro);
    color: var(--erro);
    font-weight: 500;
}

.status-icon {
    font-size: 2.25rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.status-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-detail {
    font-size: 0.875rem;
}

/* ---------- Cards institucionais ---------- */
.institucional {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
}

.institucional-card {
    background-color: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--r-lg);
    padding: 2rem;
    box-shadow: var(--sombra);
}

.institucional-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--verde-escuro);
}

.institucional-card > p {
    color: var(--texto-suave);
    margin-bottom: 1.25rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.stat {
    background-color: rgba(185, 200, 140, 0.35);
    border: 1px solid var(--borda);
    border-radius: var(--r-md);
    padding: 1rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--texto-suave);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--verde-escuro);
}

.stat-value.sm {
    font-size: 1rem;
    color: var(--texto);
}

.institucional-card.dark {
    position: relative;
    overflow: hidden;
    background-color: var(--verde-escuro);
    border-color: var(--verde-escuro);
    color: var(--branco);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.institucional-card.dark > * {
    position: relative;
    z-index: 1;
}

.institucional-card.dark h4 {
    font-size: 1.1875rem;
    font-weight: 700;
    margin-bottom: 0.875rem;
}

.contato-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.contato-icon .material-symbols-outlined {
    color: var(--verde-neon);
    font-size: 1.75rem;
}

.contato-bloco + .contato-bloco {
    margin-top: 1rem;
}

.contato-rotulo {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.25rem;
}

.contato-valor {
    font-weight: 600;
}

.institucional-card.dark .nota {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--verde-escuro);
    color: var(--branco);
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.footer-brand {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-inner p,
.footer-list {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75);
    text-align: right;
}

/* ---------- Foco visível global ---------- */
:focus-visible {
    outline: 2px solid var(--verde-escuro);
    outline-offset: 2px;
}

.site-header :focus-visible,
.hero :focus-visible,
.institucional-card.dark :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--verde-neon);
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .institucional {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-main {
        padding: 2rem 1.25rem;
    }

    .header-inner,
    .footer-inner {
        padding: 1.25rem;
    }

    .header-tag {
        display: none;
    }

    .grid-2,
    .grid-3,
    .cards-menu,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .cards-menu {
        gap: 1.25rem;
    }

    .card-choice {
        min-height: 0;
        gap: 1.5rem;
    }

    .hero,
    .section-card,
    .institucional-card {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-cta {
        width: 100%;
    }

    .footer-copy {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .header-divider {
        display: none;
    }

    /* no mobile a marca e o nome do serviço empilham para não espremer a logo */
    .header-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .header-logo {
        height: 34px;
    }

    .header-title {
        font-size: 0.875rem;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
