/* ============================================================
   IA SOLUTIONS — BASE.CSS
   Reset, variáveis neutras e utilitários compartilhados.
   A identidade visual de cada produto vive em seu próprio CSS.
============================================================ */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- VARIÁVEIS NEUTRAS ---------- */
:root {
  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Escala tipográfica fluida */
  --fs-xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --fs-base: clamp(0.94rem, 0.9rem + 0.2vw, 1rem);
  --fs-md: clamp(1.02rem, 0.95rem + 0.3vw, 1.12rem);
  --fs-lg: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  --fs-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --fs-2xl: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem);
  --fs-3xl: clamp(2.4rem, 1.6rem + 3.5vw, 4rem);
  --fs-4xl: clamp(3rem, 1.8rem + 5.5vw, 5.8rem);

  /* Espaçamento */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Raios */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 100px;

  /* Layout */
  --container-sm: 720px;
  --container-md: 960px;
  --container-lg: 1160px;
  --container-xl: 1320px;

  /* Easing */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base: 1;
  --z-elevated: 10;
  --z-overlay: 100;
  --z-modal: 1000;
  --z-topbar: 90;

  /* Transições padrão */
  --t-fast: 0.15s var(--ease-out);
  --t-base: 0.25s var(--ease-out);
  --t-slow: 0.45s var(--ease-out);
}

/* ---------- CONTAINERS ---------- */
.container {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: 22px;
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-xl { max-width: var(--container-xl); }

@media (min-width: 768px) {
  .container { padding-inline: 40px; }
}

@media (min-width: 1200px) {
  .container { padding-inline: 48px; }
}

/* ---------- UTILITÁRIOS ---------- */
.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;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mono { font-family: var(--font-mono); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }

.hidden { display: none; }

/* ---------- FOCUS STATES (acessibilidade) ---------- */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- REVEAL ON SCROLL (base) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- ACESSIBILIDADE: MOVIMENTO REDUZIDO ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- PRINT ---------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- SELEÇÃO DE TEXTO ---------- */
::selection {
  background: rgba(120, 180, 255, 0.35);
  color: inherit;
}