/* =========================================================
   ATLÂNTICA CONSTRUÇÕES — style.css (global)
   Tokens, reset, tipografia, grid e componentes base
   ========================================================= */

/* ===== 1. TOKENS ===== */
:root {
  /* Marca — extraída do logo oficial */
  --color-primary: #223581;
  --color-primary-hover: #1A2A66;
  --color-primary-light: #3B52B8;
  --color-primary-soft: #EEF1FA;

  --color-secondary: #C8862A;
  --color-secondary-hover: #A66E1F;

  /* Neutras */
  --color-white: #FFFFFF;
  --color-gray-50: #F7F8FA;
  --color-gray-100: #F0F2F6;
  --color-gray-200: #E1E5EC;
  --color-gray-300: #C7CDD8;
  --color-gray-500: #6B7280;
  --color-gray-700: #374151;
  --color-gray-900: #131722;
  --color-black: #050608;

  /* Semânticas */
  --color-success: #12855F;
  --color-error: #C0392B;

  /* Texto */
  --color-text: var(--color-gray-900);
  --color-text-soft: var(--color-gray-500);
  --color-text-inverse: var(--color-white);

  /* Tipografia */
  --font-heading: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Espaçamento */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Formas */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(5, 6, 8, .08);
  --shadow-md: 0 8px 24px rgba(5, 6, 8, .10);
  --shadow-lg: 0 18px 46px rgba(5, 6, 8, .16);
  --transition: .22s ease;

  /* Layout */
  --container: 1200px;
  --header-h: 84px;
}

/* ===== 2. RESET ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img, picture, video { display: block; max-width: 100%; height: auto; }

/* SVG inline: sem width/height o navegador assume 300x150 e estoura o layout.
   Esta regra garante um tamanho seguro mesmo se nenhuma classe específica pegar.
   Perde para .btn svg, .feature__icon svg etc., que vêm depois na cascata. */
svg { display: block; flex-shrink: 0; }
svg:not([width]) { width: 24px; height: 24px; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  letter-spacing: -.02em;
  margin: 0 0 var(--space-4);
  color: var(--color-gray-900);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: var(--font-bold); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: var(--font-bold); }
h3 { font-size: var(--text-xl); font-weight: var(--font-semibold); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; }

:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 3px; border-radius: var(--radius-sm); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== 3. LAYOUT ===== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-6); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--soft { background: var(--color-gray-50); }
.section--dark { background: var(--color-black); color: var(--color-gray-100); }
.section--dark h2, .section--dark h3 { color: var(--color-white); }

.section__head { max-width: 780px; margin-bottom: var(--space-12); }
.section__head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-sm); font-weight: var(--font-semibold);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: currentColor; }
.section--dark .eyebrow { color: var(--color-primary-light); }

.lead { font-size: var(--text-lg); color: var(--color-text-soft); }
.section--dark .lead { color: var(--color-gray-300); }

.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 4. BOTÕES ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px; padding: var(--space-3) var(--space-8);
  font-family: var(--font-heading);
  font-size: var(--text-base); font-weight: var(--font-semibold);
  border-radius: var(--radius); text-align: center;
  transition: all var(--transition);
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn--primary { background: var(--color-primary); color: var(--color-white); }
.btn--primary:hover { background: var(--color-primary-hover); color: var(--color-white); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn--secondary { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn--secondary:hover { background: var(--color-primary); color: var(--color-white); transform: translateY(-2px); }

.btn--ghost { background: rgba(255,255,255,.10); color: var(--color-white); border: 2px solid rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: var(--color-white); color: var(--color-primary); transform: translateY(-2px); }

.btn--whatsapp { background: var(--color-success); color: var(--color-white); }
.btn--whatsapp:hover { background: #0E6E4F; color: var(--color-white); transform: translateY(-2px); }

.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== 5. CARDS ===== */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all .3s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--color-primary-light); }

/* ===== 6. ACESSIBILIDADE ===== */
.skip-link {
  position: absolute; top: -60px; left: var(--space-4); z-index: 999;
  background: var(--color-primary); color: var(--color-white);
  padding: var(--space-3) var(--space-6); border-radius: 0 0 var(--radius) var(--radius);
  font-weight: var(--font-semibold);
}
.skip-link:focus { top: 0; color: var(--color-white); }

.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;
}

/* ===== 7. ANIMAÇÃO DE ENTRADA ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== 8. RESPONSIVO BASE ===== */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --header-h: 68px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .card { padding: var(--space-6); }
}
