/* Silume Design System — fundações globais e acessibilidade básica | Itens 29 e 30 */

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

html {
    min-width: 320px;
    background: var(--sl-color-surface-page);
    color: var(--sl-color-text-primary);
    font-family: var(--sl-font-body);
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: var(--sl-color-surface-page);
    color: var(--sl-color-text-secondary);
    font-size: var(--sl-font-size-400);
    line-height: var(--sl-line-height-body);
    overflow-wrap: anywhere;
}

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

button,
select {
    cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
}

img {
    display: block;
    height: auto;
    max-width: 100%;
}

a {
    color: var(--sl-color-text-link);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 0.13em;
}

h1,
h2,
h3,
h4 {
    margin-block: 0;
    color: var(--sl-color-text-primary);
    font-family: var(--sl-font-heading);
    line-height: var(--sl-line-height-heading);
    text-wrap: balance;
}

h1 {
    font-size: clamp(var(--sl-font-size-800), 4vw, var(--sl-font-size-1000));
    font-weight: var(--sl-font-weight-extrabold);
    letter-spacing: var(--sl-letter-spacing-tight);
}

h2 {
    font-size: clamp(var(--sl-font-size-700), 2.5vw, var(--sl-font-size-900));
    font-weight: var(--sl-font-weight-bold);
    letter-spacing: var(--sl-letter-spacing-tight);
}

h3 {
    font-size: var(--sl-font-size-600);
    font-weight: var(--sl-font-weight-bold);
}

h4 {
    font-size: var(--sl-font-size-400);
    font-weight: var(--sl-font-weight-bold);
}

p {
    text-wrap: pretty;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--sl-color-focus);
    outline-offset: 3px;
}

::selection {
    background: var(--sl-brand-petroleo);
    color: var(--sl-brand-marfim);
}

.sl-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    margin: -1px !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.sl-skip-link,
.pular-conteudo {
    position: fixed;
    top: var(--sl-space-3);
    left: var(--sl-space-3);
    z-index: var(--sl-z-skip-link);
    padding: var(--sl-space-2) var(--sl-space-4);
    border-radius: var(--sl-radius-md);
    background: var(--sl-brand-petroleo);
    box-shadow: var(--sl-shadow-2);
    color: var(--sl-brand-marfim);
    font-weight: var(--sl-font-weight-semibold);
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform var(--sl-duration-normal) var(--sl-ease-standard);
}

.sl-skip-link:focus,
.pular-conteudo:focus {
    outline-color: var(--sl-brand-lume);
    transform: translateY(0);
}

.sl-container {
    width: min(calc(100% - 2rem), var(--sl-content-wide));
    margin-inline: auto;
}

.sl-stack > * {
    min-width: 0;
    margin-block: 0;
}

.sl-stack > * + * {
    margin-block-start: var(--sl-stack-space, var(--sl-space-4));
}

.sl-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sl-cluster-gap, var(--sl-space-3));
    align-items: center;
}

.sl-cluster > *,
.sl-grid > * {
    min-width: 0;
    max-width: 100%;
}

.sl-grid {
    display: grid;
    gap: var(--sl-grid-gap, var(--sl-space-6));
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--sl-grid-min, 16rem)), 1fr));
}

.sl-text-muted {
    color: var(--sl-color-text-muted);
}

.sl-text-small {
    font-size: var(--sl-font-size-300);
}

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

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

@media (prefers-contrast: more) {
    :root {
        --sl-color-border-default: var(--sl-brand-petroleo);
        --sl-color-border-strong: var(--sl-brand-petroleo);
    }
}
