/* ============================================
   SPKR - BASE STYLES
   ============================================

   Arquivo: base.css
   Descrição: Reset, tipografia base e utilitários
   Versão: 1.0

   ============================================ */

/* ============================================
   CSS RESET (Modern Reset)
   ============================================ */

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-gray-900);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

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

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

/* ============================================
   TIPOGRAFIA BASE
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-gray-900);
}

h1 {
    font-size: var(--text-4xl);
    letter-spacing: var(--tracking-tight);
}

h2 {
    font-size: var(--text-3xl);
    letter-spacing: var(--tracking-tight);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

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

em,
i {
    font-style: italic;
}

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

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--color-primary);
    transition: var(--transition-colors);
}

a:hover {
    color: var(--color-primary-dark);
}

/* ============================================
   FOCUS STYLES (Acessibilidade)
   ============================================ */

*:focus {
    outline: none;
}

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

/* ============================================
   SELECTION
   ============================================ */

::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================
   SKIP LINK (Acessibilidade)
   ============================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary-dark);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
    transition: top var(--transition-base);
}

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

/* ============================================
   CONTAINER
   ============================================ */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding-x-mobile);
    padding-right: var(--container-padding-x-mobile);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--container-padding-x);
        padding-right: var(--container-padding-x);
    }
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
    gap: var(--space-6);
}

.grid--cols-1 {
    grid-template-columns: 1fr;
}

.grid--cols-2 {
    grid-template-columns: 1fr;
}

.grid--cols-3 {
    grid-template-columns: 1fr;
}

.grid--cols-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid--cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   SEÇÃO BASE
   ============================================ */

.section {
    padding-top: var(--section-padding-y-mobile);
    padding-bottom: var(--section-padding-y-mobile);
}

@media (min-width: 1024px) {
    .section {
        padding-top: var(--section-padding-y);
        padding-bottom: var(--section-padding-y);
    }
}

.section--gray {
    background-color: var(--color-gray-100);
}

.section--dark {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section__title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-gray-600);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.section--dark .section__subtitle {
    color: var(--color-gray-300);
}

@media (min-width: 640px) {
    .section__title {
        font-size: var(--text-3xl);
    }
}

@media (min-width: 1024px) {
    .section__title {
        font-size: var(--text-4xl);
    }
}

/* ============================================
   UTILITÁRIOS DE TEXTO
   ============================================ */

.text-center {
    text-align: center;
}

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

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary);
}

.text-primary-dark {
    color: var(--color-primary-dark);
}

.text-gray {
    color: var(--color-gray-600);
}

.text-white {
    color: var(--color-white);
}

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

.text-lg {
    font-size: var(--text-lg);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

/* ============================================
   UTILITÁRIOS DE DISPLAY
   ============================================ */

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

.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

/* ============================================
   UTILITÁRIOS DE ESPAÇAMENTO
   ============================================ */

.mt-4 {
    margin-top: var(--space-4);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}
