/* ================================
   Base (cores, tipografia, resets)
==================================*/
:root{
  /* Paleta */
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0ea5e9;
  --primary-700: #0284c7;
  --nav: #0b3a4a;
  --card: #ffffff;
  --border: #e2e8f0;
  --ring: rgba(14,165,233,.25);

  /* Tipografia */
  --ff-heading: "Cormorant Garamond", "Times New Roman", serif;
  --ff-body: "Century Gothic", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* Layout */
  --container: 1000px;
  --space-1: .5rem;
  --space-2: .75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(2,8,23,.06);
}

/* Reset leve e tipografia global */
* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Títulos com escala fluida */
h1, h2, h3{
  margin: 0 0 var(--space-4);
  font-family: var(--ff-heading);
  line-height: 1.2;
  color: var(--text);
}
h1{ font-size: clamp(1.75rem, 2.6vw, 2.4rem); }
h2{ font-size: clamp(1.3rem, 2vw, 1.8rem); }
h3{ font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

p{ margin: 0 0 var(--space-4); color: var(--muted); }

/* Links */
a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ================================
   Estrutura
==================================*/
.container{
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
}

/* Topbar */
.topbar{
  background: var(--nav);
  color: #fff;
  box-shadow: var(--shadow);
}
.topbar .container{
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.topbar nav{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.topbar a{
  color: #e2e8f0;
  font-weight: 500;
}
.topbar a:hover{ color: #fff; }

/* Conteúdo principal */
.lead{ font-size: 1.0625rem; color: var(--muted); }

/* Cards */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow);
}

/* Grid responsivo */
.grid{
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 720px){
  .grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3{ grid-template-columns: repeat(3, 1fr); }
}

/* Imagens */
img{ max-width: 100%; height: auto; display: block; }
.hero-img{
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 var(--space-5);
}

/* Botões */
.btn{
  display: inline-block;
  padding: .7rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: .18s ease-out;
  line-height: 1;
}
.btn:focus-visible{
  outline: 0;
  box-shadow: 0 0 0 6px var(--ring);
}
.btn:hover{ transform: translateY(-1px); }

.btn-primary{
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover{
  background: var(--primary-700);
  border-color: var(--primary-700);
}

/* Footer simples */
footer{
  padding-top: var(--space-6);
  color: var(--muted);
}

/* ================================
   Responsividade (mobile-first)
==================================*/
@media (min-width: 900px){
  .container{ padding-left: 0; padding-right: 0; }
}

/* ================================
   HERO COM FUNDO
   (overlay só UMA vez)
==================================*/
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  overflow: hidden;
}

/* Overlay via pseudo-elemento (recomendado) */
.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* Se existir um <div class="overlay"> no HTML, deixa neutro pra não duplicar */
.hero .overlay{
  display: none;
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-family: var(--ff-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
  animation: fadeInUp 1s ease-out forwards;
}

/* Animação */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
