
/* Critical CSS for above-the-fold content */
:root {
  --primary: 210 100% 15%;
  --primary-foreground: 210 40% 98%;
}

/* Reset básico e otimização para mobile */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Melhorias de texto para mobile */
@media (max-width: 640px) {
  html {
    font-size: 15px;
    line-height: 1.4;
  }
}

/* Pre-conecta com origens de recursos críticos */
:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Content-visibility para melhorar LCP e FCP */
.cv-auto {
  content-visibility: auto;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* Otimização de imagens */
img {
  max-width: 100%;
  display: block;
  height: auto;
}

/* Layout skeleton para reduzir CLS */
header {
  width: 100%;
  background-color: #00294b;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 40;
  will-change: transform;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
}

.bg-gradient-hero {
  background-image: linear-gradient(to bottom, #00294b, #0066a6);
  padding-top: 3rem;
  padding-bottom: 3rem;
  color: #ffffff;
}

/* Mobile-first spacing */
@media (max-width: 640px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .bg-gradient-hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Add shine animation for CTA buttons - otimizado para performance */
@keyframes shine {
  from {
    left: -100%;
    opacity: 0.5;
  }
  to {
    left: 100%;
    opacity: 0;
  }
}

.animate-shine {
  animation: shine 1.5s ease-in-out infinite;
  will-change: opacity;
}

/* Adiciona otimização para formulários em mobile */
@media (max-width: 640px) {
  input, button, select, textarea {
    font-size: 16px !important; /* Previne zoom em iOS */
  }
  
  .card-mobile-padding {
    padding: 1rem !important;
  }
}

/* Precarrega fontes importantes */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/playfairdisplay/v30/nuFiD-vYSZviVYUb_rj3ij__anPXDTzYgEM86xQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout placeholders para reduzir CLS */
.header-placeholder {
  height: 64px;
}

.hero-placeholder {
  height: 300px;
}
