/*
 * main.css — Navega Theme · Entry Point
 * Importa todos os módulos na ordem correta, depois declara
 * reset, tipografia global e utilitários.
 *
 * Dependência: style-tokens.css (enfileirado antes pelo WordPress)
 * ============================================================ */

/* ============================================================
   RESET + BASE
   ============================================================ */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: var(--font-weight-regular);
    line-height: var(--leading-body);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

img, svg        { display: block; max-width: 100%; }
a               { color: inherit; text-decoration: none; }
ul, ol          { list-style: none; }
button          { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
table           { border-collapse: collapse; width: 100%; }

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */

.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;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: var(--z-toast);
    padding: var(--space-3) var(--space-5);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-md);
    transition: top var(--transition-base);
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
    outline: 2px solid var(--color-border-focus);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ============================================================
   TIPOGRAFIA GLOBAL
   ============================================================ */

h1 { font-size: var(--text-h1); font-weight: var(--font-weight-bold); line-height: var(--leading-h1); letter-spacing: var(--tracking-h1); }
h2 { font-size: var(--text-h2); font-weight: var(--font-weight-bold); line-height: var(--leading-h2); }
h3 { font-size: var(--text-h3); font-weight: var(--font-weight-bold); line-height: var(--leading-h3); }
h4 { font-size: var(--text-h4); font-weight: var(--font-weight-bold); }

/* Section label — eyebrow acima de títulos */
.section__label {
    display: block;
    font-size: var(--text-caption);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.section__title    { font-size: var(--text-h2); font-weight: var(--font-weight-bold); color: var(--color-text); margin-bottom: var(--space-4); text-transform: uppercase; letter-spacing: 0.04em; }
.section__subtitle { font-size: var(--text-body-lg); color: var(--color-text-secondary); line-height: var(--leading-body-lg); margin-bottom: var(--space-6); }
.section__text     { font-size: var(--text-body); color: var(--color-text-secondary); line-height: var(--leading-body); margin-bottom: var(--space-4); }
.section__prose    { font-size: var(--text-body); line-height: var(--leading-body-lg); color: var(--color-text); }
.section__prose p + p { margin-top: var(--space-4); }

/* Variantes sobre fundos escuros */
.section__title--light    { color: var(--color-text-inverse); }
.section__subtitle--light { color: rgba(255,255,255,0.8); }
.section__text--light     { color: rgba(255,255,255,0.85); }

/* Cabeçalhos de seção reutilizáveis */
.section-header            { margin-bottom: var(--space-8); }
.section-header--centered  { text-align: center; }
.section-header--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-6);
    margin-bottom: var(--space-7);
}

/* ============================================================
   UTILITÁRIOS
   ============================================================ */

/* Placeholders de imagem — remover quando imagens reais chegarem */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    min-height: 200px;
}
.img-placeholder--large      { min-height: 400px; border-radius: var(--radius-lg); }
.img-placeholder--featured   { min-height: 400px; border-radius: var(--radius-lg); }
.img-placeholder--person     { width: 180px; height: 240px; border-radius: var(--radius-lg); }
.img-placeholder--circle     { width: 96px; height: 96px; border-radius: var(--radius-pill); }
.img-placeholder--logo       { width: 120px; height: 60px; border-radius: var(--radius-md); }
.img-placeholder--credential { width: 140px; height: 48px; border-radius: var(--radius-md); }

/* ============================================================
   SCROLL ANIMATIONS
   Estado inicial: elementos invisíveis e deslocados.
   .is-visible (adicionado pelo JS via IntersectionObserver) dispara a transição.
   ============================================================ */

.fade-up,
.fade-in,
.slide-left,
.slide-right {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.fade-up   { transform: translateY(28px); }
.fade-in   { transform: none; }
.slide-left  { transform: translateX(-32px); }
.slide-right { transform: translateX(32px); }

.fade-up.is-visible,
.fade-in.is-visible,
.slide-left.is-visible,
.slide-right.is-visible {
    opacity: 1;
    transform: none;
}

/* Respeita preferência de reduzir movimento */
@media (prefers-reduced-motion: reduce) {
    .fade-up, .fade-in, .slide-left, .slide-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
