/* =========================================================================
   Base: reset, fonte, tipografia, foco
   ========================================================================= */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--text);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
h4 { font-size: var(--text-base); }

p {
    margin: 0;
    text-wrap: pretty;
}

p + p { margin-top: var(--space-3); }

ul, ol {
    margin: 0;
    padding-left: 1.25em;
}

a {
    color: var(--accent-text);
    text-decoration: none;
    text-underline-offset: 2px;
}

a:hover { text-decoration: underline; }

strong, b { font-weight: 600; }

small { font-size: var(--text-sm); }

img, svg, canvas, video {
    display: block;
    max-width: 100%;
}

img { height: auto; }

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--space-6) 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

button { cursor: pointer; }

button:disabled { cursor: not-allowed; }

fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

legend { padding: 0; }

summary { cursor: pointer; }

summary::-webkit-details-marker { display: none; }

[hidden] { display: none !important; }

::selection {
    background: var(--accent-soft);
    color: var(--text);
}

:focus { outline: none; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* SVG dentro de botões e links nunca recebe o clique */
button svg,
a svg,
summary svg,
label svg {
    pointer-events: none;
}

.icon {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 1000;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--text-on-accent);
    font-weight: 600;
}

.skip-link:focus { top: var(--space-4); }

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

@media (forced-colors: active) {
    .btn,
    .form-control,
    .form-select,
    .card,
    .choice__body {
        border: 1px solid CanvasText;
    }
}
