/* ==========================================================================
   TrocaDireta — Reset e base tipográfica
   ========================================================================== */

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    font-variation-settings: "wdth" var(--wdth-normal);
    line-height: var(--lh-base);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img {
    height: auto;
}

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

button {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}

button:disabled {
    cursor: not-allowed;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    color: var(--color-ink-strong);
    text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); font-weight: var(--fw-black); line-height: var(--lh-tight); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.015em; }
h2 { font-size: var(--fs-2xl); font-weight: var(--fw-black); font-variation-settings: "wdth" var(--wdth-wide); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p {
    text-wrap: pretty;
}

a {
    color: var(--color-primary-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
    color: var(--color-text);
}

ul[role="list"],
ol[role="list"] {
    list-style: none;
    padding: 0;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

hr {
    border: 0;
    border-top: 1px solid var(--color-line);
}

strong,
b {
    font-weight: var(--fw-bold);
}

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

::selection {
    background: var(--color-highlight);
    color: var(--color-ink-strong);
}

:focus {
    outline: none;
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-xs);
}

[hidden] {
    display: none !important;
}

/* Acessibilidade */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: var(--z-toast);
    padding: var(--space-3) var(--space-4);
    background: var(--color-ink);
    color: #fff;
    font-weight: var(--fw-bold);
    border-radius: var(--radius-sm);
    transform: translateY(-160%);
    transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
    transform: none;
    color: #fff;
}

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

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