/* ============================================================
   CTS Catálogo — Base
   Reset universal, tipografia padrão, foco e prefers-reduced-motion.
   Carregado depois de tokens.css.
   ============================================================ */

/* ============================================================
   Brand fonts
   DM Sans — UI (variable, weights 300-700)
   Univers Next Pro — display (títulos hero, H1 institucional)
   ============================================================ */
@font-face {
  font-family: 'DM Sans';
  src: url('/assets/brand-fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype-variations');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('/assets/brand-fonts/DMSans-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
  font-weight: 100 1000;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Univers Next Pro';
  src: url('/assets/brand-fonts/UniversNextPro-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Univers Next Pro';
  src: url('/assets/brand-fonts/UniversNextPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Material Symbols — keep icon rendering consistent */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ui);
  background: var(--surface-body);
  color: var(--text-primary);
  line-height: var(--lh-base);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body[data-scroll-locked='true'] {
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Type defaults (can be overridden per page) */
h1 {
  font-size: var(--text-3xl);
  font-weight: var(--fw-500);
  letter-spacing: -0.025em;
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--text-2xl);
  font-weight: var(--fw-500);
  letter-spacing: -0.015em;
  line-height: var(--lh-snug);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--fw-500);
  letter-spacing: -0.01em;
  line-height: var(--lh-snug);
}

p {
  font-size: var(--text-md);
  line-height: var(--lh-copy-md);
}

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

small {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--lh-copy-sm);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.75em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--surface-2);
  color: var(--text-secondary);
}

a {
  color: inherit;
}

/* Transição suave em controles de formulário (consolidado de redesign.css) */
button,
input,
select,
textarea {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

/* Focus — anel de foco consistente em todos os elementos interativos */
:where(a, button, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

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

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