/* =========================
   RESET & BASE STYLES
   ========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  -ms-text-size-adjust: 100%;
}

/* Forçar aceleração GPU em elementos críticos */
.nav-home, .hero-bg .bg, .motion-item {
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* --- Início do Carregamento das Fontes Locais --- */


/* Poppins Light (300) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  /* O caminho ../fonts/ está CORRETO partindo de /assets/css/ */
  src: url('../fonts/poppins-v24-latin-300.woff2') format('woff2');
}

/* Poppins Regular (400) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-regular.woff2') format('woff2');
}

/* Poppins Medium (500) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-500.woff2') format('woff2');
}

/* Poppins SemiBold (700) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-700.woff2') format('woff2');
}

/* Poppins ExtraBold (800) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-800.woff2') format('woff2');
}

/* Poppins Black (900) */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/poppins-v24-latin-900.woff2') format('woff2');
}

/* Manrope Light (200) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-200.woff2') format('woff2');
}

/* Manrope Regular (400) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400; /* CORRIGIDO de 500 */
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-regular.woff2') format('woff2');
}

/* Manrope Bold (700) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-700.woff2') format('woff2');
}

/* Manrope ExtraBold (800) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope-v20-latin-800.woff2') format('woff2');
}

/* Karantina Light (300) */
@font-face {
  font-family: 'Karantina'; /* CORRIGIDO de 'Manrope' */
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/karantina-v13-latin-300.woff2') format('woff2');
}

/* Karantina regular (400) */
@font-face {
  font-family: 'Karantina'; /* CORRIGIDO de 'Manrope' */
  font-style: normal;
  font-weight: 400; /* CORRIGIDO de 500 */
  font-display: swap;
  src: url('../fonts/karantina-v13-latin-regular.woff2') format('woff2');
}

/* Forçar aceleração GPU em elementos críticos */
.nav-home, .hero-bg .bg, .motion-item {
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

body {
  font-family: var(--font-base);
  color: var(--color-text);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}



/* =========================
   CSS CUSTOM PROPERTIES
   ========================= */

:root {
    --font-base: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-destaque: 'Manrope', Georgia, serif;
    --font-blockquote: 'Karantina', 'Courier New', Courier, monospace;
    
    color-scheme: light only;

  /* Colors */
  --color-primary: #FF6B00;
  --color-secondary: #F75705;
  --color-terc: #FF8A35;
  --color-bg: #F3F3F5;
  --color-bg-escuro: #EDEDED;
  --color-text: #5A5A5A;
  --color-text-destaque: #3A3A3A;
  --color-text-muted: #8D8D8D;
  --color-alerta: #e74c3c;
  --color-sucesso: #2ecc71;
  --white: #ffffff;
  --black: #000000;


  /* Gradients */
  --degrade: linear-gradient(90deg, rgba(255, 107, 0, 1) 0%, rgba(255, 179, 124, 1) 100%);
  --degrade-vertical: linear-gradient(180deg, rgba(255, 107, 0, 1) 0%, rgba(255, 179, 124, 1) 100%);

  /* Spacing System */
  --spacing-xs: 0.5rem;   /* 8px - Espaçamentos pequenos */
  --spacing-sm: 1rem;     /* 16px - Margens entre elementos */
  --spacing-md: 2rem;     /* 32px - Seções, cards, blocos */
  --spacing-lg: 4rem;     /* 64px - Grandes separações */
  --spacing-xl: 6rem;     /* 96px - Seções principais */
  
  /* Container Spacing */
  --container-padding: clamp(1rem, 5vw, 4.25rem);
  --container-max-width: 1400px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
}

input, textarea, select {
  color-scheme: light !important;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--color-bg) !important;
  color: var(--color-text-destaque) !important;
}

/* Scrollbars consistentes */
* {
  scrollbar-color: var(--color-primary) var(--color-bg) !important;
}

::-webkit-scrollbar-track {
  background: var(--color-bg) !important;
}

/* Dark mode support (opcional) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Manter suas variáveis originais intactas */
    --color-bg: #F3F3F5 !important;
    --color-bg-escuro: #EDEDED !important;
    --color-text: #5A5A5A !important;
    --color-text-destaque: #3A3A3A !important;
    --color-text-muted: #8D8D8D !important;
    --white: #ffffff !important;
    --black: #000000 !important;
    
    /* Forçar esquema de cores claro */
    color-scheme: light only;
  }
  
  /* Neutralizar alterações automáticas do navegador */
  input, textarea, select, button {
    color-scheme: light !important;
  }
}


/* =========================
   TYPOGRAPHY SYSTEM
   ========================= */

/* Título principal (home hero) */
h1 {
  font-size: clamp(2.813rem, 8vw, 6rem);
  line-height: 1;
  font-weight: 800;
  color: var(--color-text-destaque);
  font-family: var(--font-destaque);
  letter-spacing: -0.1em;
}

/* Subtítulo ou seções principais */
h2, .h2 {
  font-size: clamp(1.875rem, 4vw, 2.5rem); /* 30-40px */
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-destaque);
  font-family: var(--font-destaque);
  margin-bottom: var(--spacing-md);
}

.section-contato h2 {
  font-size: clamp(2.813rem, 8vw, 4rem); /* 30-40px */
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-destaque);
  font-family: var(--font-destaque);
  margin-bottom: var(--spacing-sm);
}

/* Títulos menores ou cards */
h3, .h3{
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  line-height: 1.3;
  color: var(--color-text-destaque);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

/* Título de bloco ou destaque leve */
h4 {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem); /* 18–22px */
  line-height: 1.4;
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--spacing-xs);
}

/* Subtítulos */
h5, .h5 {
  font-size: clamp(1rem, 2vw, 1.125rem); /* 16–18px */
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-text-destaque);
  margin-bottom: var(--spacing-xs);
}

/* Título pequeno */
h6, .h6 {
  font-size: clamp(0.875rem, 2vw, 1rem); /* 14–16px */
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Texto padrão (já está no body), repetir se quiser em `p` */
p {
  font-size: clamp(0.805rem, 2.5vw, 1rem);
  line-height: 1.6;
  color: var(--color-text-destaque);
}

/* Texto grande */
.text-lg {
  font-size: clamp(1rem, 2.5vw, 1.125rem); /* 16–18px */
  line-height: 1.5;
}

/* Texto pequeno */
small, .text-sm {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem); /* 12–14px */
  line-height: 1.4;
  color: var(--color-text-muted);
}

/* Lead text */
.lead {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem); /* 18–20px */
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-text);
}

/* =========================
   LINKS
   ========================= */

a{
    text-decoration: none;
    color: var(--color-text-destaque);
    transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.txt-degrade{
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================
   UTILITY CLASSES
   ========================= */

/* Text utilities */
.txt-degrade {
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.txt-center { text-align: center; }
.txt-left { text-align: left; }
.txt-right { text-align: right; }

.txt-bold { font-weight: 700; }
.txt-semibold { font-weight: 600; }
.txt-medium { font-weight: 500; }
.txt-light { font-weight: 300; }

.txt-uppercase { text-transform: uppercase; }
.txt-lowercase { text-transform: lowercase; }
.txt-capitalize { text-transform: capitalize; }

/* Color utilities */
.txt-primary { color: var(--color-primary); }
.txt-secondary { color: var(--color-secondary); }
.txt-muted { color: var(--color-text-muted); }
.txt-white { color: var(--white); }

/* Spacing utilities */
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

/* =========================
   FORM ELEMENTS
   ========================= */

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* =========================
   MEDIA & IMAGES
   ========================= */

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Aspect ratio utility */
.aspect-square { aspect-ratio: 1/1; }
.aspect-video { aspect-ratio: 16/9; }
.aspect-photo { aspect-ratio: 4/3; }

/* =========================
   ACCESSIBILITY
   ========================= */

/* Screen reader only */
.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;
}

/* Focus visible for better keyboard navigation */
.focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@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;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-secondary: #000000;
    --color-text: #000000;
    --color-bg: #ffffff;
  }
}

/* =========================
   PRINT STYLES
   ========================= */

@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  img {
    page-break-inside: avoid;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* Otimizações de performance */
.hero-bg .bg,
.motion-item,
.card-artigo-imagem-link img {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0); /* Força aceleração de hardware segura */
}

/* Lazy loading para imagens */
img {
  content-visibility: auto;
}

/* Melhor suporte a leitores de tela */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--color-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  transition: top 0.3s;
  z-index: 9999;
}

.skip-link:focus {
  top: 6px;
}

/* Melhor contraste para foco */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}