/* ==========================================================================
   DESIGN SYSTEM & GLOBAL STYLES - MGT ADVOCACIA
   (Estilo inspirado no modelo Nery Advogados 2019)
   ========================================================================== */

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600&family=Roboto:wght@300;400;500&display=swap');

/* Variables */
:root {
  /* Colors */
  --bg-primary: #FAF9F6;      /* Off-white quente de fundo */
  --bg-secondary: #FFFFFF;    /* Branco puro para contraste */
  --bg-dark: #121518;         /* Charcoal escuro para elementos de alto contraste */
  --color-primary: #222222;   /* Quase preto para títulos menores e destaques */
  --color-secondary: #666666; /* Cinza médio elegante para corpo de texto (estilo Roboto 300) */
  --color-muted: #999999;     /* Cinza claro para textos de apoio */
  --color-accent: #4A5B6C;    /* Azul Ardósia/Aço (MGT Logo) */
  --color-accent-hover: #384856; /* Azul Escuro Metálico */
  --color-border: #E8E7E3;    /* Linha de borda muito fina e clara */
  --color-border-dark: #2E3238;
  
  /* Fonts */
  --font-serif: 'Raleway', sans-serif; /* Títulos finos e limpos */
  --font-sans: 'Roboto', sans-serif;   /* Corpo de texto leve */
  
  /* Layout & Spacing */
  --max-width: 1200px;
  --header-height: 90px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  
  /* Animation */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--color-secondary);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-weight: 300 !important;
  text-transform: uppercase;
  line-height: 1.25;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 3.2rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.2rem;
  color: var(--color-primary);
}

p {
  margin-bottom: 1.5rem;
  font-weight: 300;
}

a {
  color: #999;
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

strong {
  font-weight: 500;
  color: var(--color-primary);
}

/* Nery Advogados Decorative Line below headers */
.space {
  background: var(--color-accent);
  height: 3px;
  margin: 15px 0 30px;
  width: 110px;
}

.center-space {
  margin: 15px auto 30px;
}

/* Subtitle style */
.section-tag {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

/* Global Layout Elements */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

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

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  align-items: center;
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--bg-dark);
  border-color: var(--bg-dark);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-secondary);
  border-color: var(--color-muted);
}

.btn-secondary:hover {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-text {
  padding: 0;
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-text::after {
  content: '→';
  transition: var(--transition-fast);
}

.btn-text:hover {
  color: var(--color-primary);
}

.btn-text:hover::after {
  transform: translateX(5px);
}

/* Header / Navigation */
.header {
  height: var(--header-height);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: rgba(250, 249, 246, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.header.scrolled {
  height: 75px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img {
  height: 52px;
  width: auto;
  display: block;
  transition: var(--transition-smooth);
}

.header.scrolled .logo img {
  height: 44px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}

.nav-links a {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-accent);
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  z-index: 1001;
}

.menu-btn span {
  display: block;
  height: 1.5px;
  width: 100%;
  background-color: var(--color-primary);
  transition: var(--transition-smooth);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  color: var(--color-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
  gap: var(--space-lg);
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--color-accent);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  font-family: var(--font-serif);
  text-transform: uppercase;
  font-weight: 400;
}

.footer-col p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: var(--color-secondary);
  transition: var(--transition-fast);
}

.footer-col ul a:hover {
  color: var(--color-accent);
  padding-left: 5px;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-logo img {
  height: 60px;
  /* Remove o filtro invert, mantendo a logo escura no rodapé claro */
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.footer-bottom a {
  color: var(--color-secondary);
  margin-left: 1.5rem;
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* Custom Lawyer Miniature style inspired by Nery Advogados */
.miniatura {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.miniatura img {
  background: #eee;
  border-radius: 100%;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  display: inline-block;
  transition: var(--transition-smooth);
}

.miniatura:hover img {
  transform: scale(1.03);
  border-color: var(--color-accent);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.8rem;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .menu-btn {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition-smooth);
    border-top: 1px solid var(--color-border);
  }
  
  .nav-links.open {
    left: 0;
  }
  
  .menu-btn.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  
  .menu-btn.open span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-btn.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-bottom div {
    display: flex;
    justify-content: center;
  }
}
