:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #152235;
    background: #f6f3ed;
    --navy: #10253d;
    --navy-light: #173653;
    --gold: #c7a15b;
    --muted: #657184;
    --border: #e4e8ec;
    --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.65; }
a { color: #8b672b; }

.public-header {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 72px;
    padding: 14px clamp(20px, 5vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(16, 37, 61, .97);
    box-shadow: 0 6px 24px rgba(6, 19, 32, .16);
}

.public-brand { display: inline-flex; align-items: center; text-decoration: none; }
.public-brand img { display: block; width: min(220px, 48vw); height: auto; }
.public-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.public-nav a { color: #dce4ec; font-size: 14px; font-weight: 600; text-decoration: none; }
.public-nav a:hover { color: var(--gold); }
.public-nav .nav-contact { padding: 9px 16px; border: 1px solid rgba(199, 161, 91, .7); border-radius: 8px; color: #f2d79f; }

.page-hero {
    padding: 58px 20px 108px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #0c1d31, var(--navy-light));
}
.page-hero .eyebrow { margin: 0 0 10px; color: #e7c98f; font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.page-hero h1 { max-width: 800px; margin: 0 auto; color: #fff; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; }
.page-hero p { max-width: 680px; margin: 18px auto 0; color: #cbd5df; font-size: 17px; }

.legal-shell, .contact-shell { width: min(100% - 32px, 980px); margin: -64px auto 70px; position: relative; }
.legal-card, .contact-card { padding: clamp(25px, 5vw, 58px); border: 1px solid rgba(216, 220, 224, .75); border-radius: 18px; background: #fff; box-shadow: 0 20px 55px rgba(21, 34, 53, .11); }
.legal-card > h1 { display: none; }
.legal-card .small:first-of-type { margin-top: 0; padding-bottom: 24px; border-bottom: 1px solid var(--border); color: var(--muted); }
.legal-card h2, .legal-card h3 { color: var(--navy); line-height: 1.25; }
.legal-card h2 { margin: 38px 0 12px; font-family: Georgia, serif; font-size: clamp(22px, 3vw, 28px); }
.legal-card h3 { margin-top: 24px; }
.legal-card p, .legal-card li { color: #455467; }
.legal-card ul, .legal-card ol { padding-left: 25px; }
.legal-card li + li { margin-top: 8px; }
.legal-card table { width: 100%; margin: 22px 0; border-collapse: collapse; border: 1px solid var(--border); }
.legal-card th, .legal-card td { padding: 13px 15px; border-bottom: 1px solid var(--border); text-align: left; }
.legal-card th { color: var(--navy); background: #f5f7f8; }
.legal-card blockquote, .legal-card .note { margin: 22px 0; padding: 17px 20px; border-left: 4px solid var(--gold); background: #fbf7ef; color: #4c5967; }

.contact-shell { width: min(100% - 32px, 860px); }
.contact-intro { margin: 0 0 28px; color: var(--muted); }
.alert { margin-bottom: 24px; padding: 14px 16px; border-radius: 9px; font-weight: 600; }
.alert.success { color: #1c6238; background: #e7f5ec; border: 1px solid #bfe4cd; }
.alert.error { color: #8c2f2f; background: #fff0f0; border: 1px solid #f1caca; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--navy); font-size: 14px; font-weight: 750; }
.optional { color: #8994a0; font-size: 12px; font-weight: 500; }
.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #ccd4dc;
    border-radius: 9px;
    color: #1d2e41;
    background: #fff;
    font: inherit;
    outline: none;
}
.form-field textarea { min-height: 170px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(199, 161, 91, .18); }
.contact-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.submit-contact { min-height: 48px; padding: 0 26px; border: 0; border-radius: 9px; color: #fff; background: var(--navy); font: inherit; font-weight: 750; cursor: pointer; }
.submit-contact:hover { background: #173653; }
.response-time { margin: 0; color: var(--muted); font-size: 13px; }

.public-footer { margin-top: auto; padding: 30px clamp(20px, 5vw, 60px); color: #fff; background: var(--navy); }
.public-footer > div { max-width: 1200px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.public-footer ul { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.public-footer a, .public-footer p { color: #c6d0dc; font-size: 14px; text-decoration: none; }
.public-footer a:hover, .public-footer p a { color: var(--gold); }

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background: #f6f3ed;
}

.error-card {
    width: min(100%, 560px);
    padding: 0;
    text-align: center;
}

.error-logo {
    display: inline-block;
    margin-bottom: 50px;
}

.error-logo img {
    display: block;
    width: min(330px, 78vw);
    height: auto;
}

.error-code {
    margin: 0 0 12px;
    color: #9a7332;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.error-card h1 {
    margin: 0;
    color: var(--navy);
    font-family: Georgia, serif;
    font-size: clamp(32px, 6vw, 46px);
    line-height: 1.15;
}

.error-message {
    max-width: 440px;
    margin: 16px auto 30px;
    color: var(--muted);
    font-size: 16px;
}

.error-home {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border-radius: 9px;
    color: #fff;
    background: var(--navy);
    font-weight: 750;
    text-decoration: none;
    transition: background .2s ease;
}

.error-home:hover {
    color: #fff;
    background: var(--navy-light);
}

.error-home:focus-visible {
    outline: 3px solid rgba(199, 161, 91, .55);
    outline-offset: 4px;
}

@media (max-width: 700px) {
    .public-header { position: static; align-items: flex-start; }
    .public-nav { gap: 13px; flex-wrap: wrap; justify-content: flex-end; }
    .public-nav a { font-size: 12px; }
    .public-nav .nav-contact { padding: 6px 10px; }
    .page-hero { padding-top: 42px; }
    .contact-form { grid-template-columns: 1fr; }
    .form-field.full, .contact-actions { grid-column: 1; }
    .legal-card, .contact-card { padding: 24px 20px; }
    .legal-card table { display: block; overflow-x: auto; }
    .public-footer > div, .public-footer ul { flex-direction: column; text-align: center; }
    .public-footer ul { gap: 12px; }
    .error-page { padding: 36px 20px; }
    .error-logo { margin-bottom: 38px; }
}

/* Escala tipográfica acessível e contraste reforçado para páginas públicas. */
html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    --muted: #566376;
}

body {
    font-size: 1rem;
    line-height: 1.65;
}

p,
li,
.public-nav a {
    font-size: 1rem;
}

small,
.page-hero .eyebrow,
.optional {
    font-size: .8125rem;
    line-height: 1.45;
}

.form-field label {
    font-size: .9375rem;
}

.form-field input,
.form-field select,
.form-field textarea,
button {
    min-height: 2.75rem;
    font-size: 1rem;
}

:focus-visible {
    outline: 3px solid #2f73ad;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
