/*
 * ═══════════════════════════════════════════════════════════
 *  MEGAHPROJ — DESIGN SYSTEM
 *  Baseado no Manual de Identidade Visual 2026
 *  Bloco 1.1 — design-system.css
 * ═══════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ─────────────────────────────────────────────
   VARIÁVEIS — Brand Manual Megahproj 2026
   Regra: ≥ 70% branco | Bordô ≤ 5%
───────────────────────────────────────────── */
:root {
  /* Paleta Oficial */
  --megah-white:       #ffffff;   /* Dominante ≥ 70% */
  --megah-yellow:      #fde100;   /* Principal (Pantone 107 C) */
  --megah-yellow-alt:  #ffcc00;   /* Principal Alt (Pantone 109 C) */
  --megah-gray:        #5b6770;   /* Neutro (Pantone 424 C) */
  --megah-gray-light:  #a7a9ac;   /* Neutro claro */
  --megah-black:       #111111;   /* Tipografia / Preto Absoluto */
  --megah-burgundy:    #990000;   /* Destaque — uso ≤ 5% (Pantone 187 C equiv.) */

  /* UI Auxiliares */
  --bg-light:          #f8f9fa;
  --bg-card:           #ffffff;
  --text-dark:         #1e1e1e;
  --text-muted:        #6c757d;
  --border:            #e9ecef;
  --border-dark:       #dee2e6;

  /* Tipografia */
  --font:              'Montserrat', sans-serif;

  /* Layout */
  --container-width:   1200px;
  --section-y:         80px;

  /* Header */
  --topbar-h:          38px;
  --navbar-h:          68px;
  --header-h:          calc(var(--topbar-h) + var(--navbar-h));

  /* Transições */
  --ease:              0.3s ease;
  --ease-slow:         0.5s ease;

  /* Sombras */
  --shadow-sm:         0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:         0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:         0 8px 32px rgba(0,0,0,0.18);
  --shadow-xl:         0 16px 48px rgba(0,0,0,0.24);

  /* Bordas */
  --radius-sm:         3px;
  --radius-md:         6px;
  --radius-lg:         12px;
}

/* ─────────────────────────────────────────────
   RESET MODERNO
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--megah-white);
  color: var(--megah-black);
  line-height: 1.6;
  padding-top: var(--header-h); /* offset para header fixo */
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--ease), opacity var(--ease);
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

input, select, textarea {
  font-family: var(--font);
}

/* ─────────────────────────────────────────────
   CONTAINER & LAYOUT
───────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-y) 0;
}

.section--dark {
  background-color: var(--megah-black);
  color: var(--megah-white);
}

.section--light {
  background-color: var(--bg-light);
}

.section--yellow {
  background-color: var(--megah-yellow);
}

/* ─────────────────────────────────────────────
   TIPOGRAFIA — Brand Manual Megahproj 2026
   Montserrat 900 (Black)     → Títulos principais
   Montserrat 600 (SemiBold)  → Subtítulos / Botões
   Montserrat 400 (Regular)   → Texto de Leitura e Descrições
───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  line-height: 1.2;
  color: var(--megah-black);
}

h1 { font-weight: 900; font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.6rem); }
h4 { font-weight: 600; font-size: 1.1rem; }
h5 { font-weight: 600; font-size: 1rem; }

p {
  font-weight: 400; /* Regular — Brand Manual: Montserrat 400 para texto de leitura */
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.7;
}

p:last-child { margin-bottom: 0; }

/* Títulos de seção com acento bordô */
.section-title {
  font-weight: 900;
  color: var(--megah-black);
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--megah-yellow) 0%, var(--megah-burgundy) 100%);
  border-radius: 2px;
  margin: 12px auto 0;
}

.section-subtitle {
  text-align: center;
  font-weight: 400; /* Regular — Brand Manual: texto descritivo usa Montserrat 400 */
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1.05rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────
   BOTÕES
───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--megah-burgundy);
  color: var(--megah-white);
  border-color: var(--megah-burgundy);
}
.btn-primary:hover {
  background: #7a0000;
  border-color: #7a0000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--megah-yellow);
  color: var(--megah-black);
  border-color: var(--megah-yellow);
}
.btn-secondary:hover {
  background: var(--megah-yellow-alt);
  border-color: var(--megah-yellow-alt);
  transform: translateY(-1px);
}

.btn-outline-white {
  background: transparent;
  color: var(--megah-white);
  border-color: var(--megah-white);
}
.btn-outline-white:hover {
  background: var(--megah-white);
  color: var(--megah-black);
}

.btn-outline-dark {
  background: transparent;
  color: var(--megah-black);
  border-color: var(--megah-black);
}
.btn-outline-dark:hover {
  background: var(--megah-black);
  color: var(--megah-white);
}

/* ─────────────────────────────────────────────
   UTILITÁRIOS
───────────────────────────────────────────── */
.text-white    { color: var(--megah-white) !important; }
.text-yellow   { color: var(--megah-yellow) !important; }
.text-burgundy { color: var(--megah-burgundy) !important; }
.text-gray     { color: var(--megah-gray) !important; }
.text-muted-u  { color: var(--text-muted) !important; }

.fw-300 { font-weight: 300; }
.fw-600 { font-weight: 600; }
.fw-900 { font-weight: 900; }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-block { display: block; }

.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

/* ─────────────────────────────────────────────
   SCROLL REVEAL (Intersection Observer)
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Delay para animações em sequência */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─────────────────────────────────────────────
   BOTÃO WHATSAPP FLUTUANTE
───────────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: var(--megah-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 500;
  transition: transform var(--ease), box-shadow var(--ease);
  animation: whatsapp-pulse 3s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50%       { box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65); }
}

/* ─────────────────────────────────────────────
   BOTÃO SCROLL-TO-TOP
───────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 96px;
  right: 32px;
  width: 42px;
  height: 42px;
  background: var(--megah-black);
  color: var(--megah-white);
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
  cursor: pointer;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.scroll-top:hover {
  background: var(--megah-burgundy);
}

/* ─────────────────────────────────────────────
   RESPONSIVIDADE
───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
}

@media (max-width: 992px) {
  :root {
    --section-y: 60px;
    --navbar-h:  64px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-y: 48px;
  }
  .section-subtitle { margin-bottom: 32px; }
}

@media (max-width: 480px) {
  :root {
    --topbar-h: 0px; /* topbar oculta em mobile */
    --header-h: var(--navbar-h);
  }
}
