/* =========================================================
   CAPUTO BASTOS & FRUET ADVOGADOS — styles.css
   ========================================================= */

/* --- Variáveis ------------------------------------------ */
:root {
  --gold:        #C9A901;
  --gold-light:  #d4b520;
  --dark:        #1A1917;
  --dark-nav:    #1C1B18;
  --bg:          #F8F5EF;
  --bg-alt:      #F0ECE3;
  --text:        #1A1917;
  --text-muted:  #6B6860;
  --border:      #E0DBD0;

  --font: 'Calibri', 'Calibri Local', sans-serif;

  --max-w: 1280px;
  --nav-h: 100px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* --- Utilitários --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.section-label::before {
  content: '/';
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gold);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 1.5rem 0 2.5rem;
  transform-origin: left;
  transition: width 0.6s var(--ease);
}

/* --- Animação de entrada (Intersection Observer) ------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal:not(.visible) { transition-delay: 0s; }
.reveal.visible.reveal-delay-1 { transition-delay: 0.1s; }
.reveal.visible.reveal-delay-2 { transition-delay: 0.2s; }
.reveal.visible.reveal-delay-3 { transition-delay: 0.3s; }
.reveal.visible.reveal-delay-4 { transition-delay: 0.4s; }
.reveal.visible.reveal-delay-5 { transition-delay: 0.5s; }

/* =========================================================
   NAVBAR
   ========================================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s;
}

#navbar.transparent {
  background: transparent;
}

#navbar.scrolled {
  background: #fff;
  box-shadow: 0 2px 24px rgba(0,0,0,0.10);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  height: 80px;
  width: auto;
  /* logo em cores originais */
  transition: opacity 0.3s;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.25s;
}

#navbar.transparent .nav-links a { color: #fff; }
#navbar.scrolled  .nav-links a { color: var(--dark); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 1px;
  background: var(--gold);
  transition: left 0.3s var(--ease), right 0.3s var(--ease);
}

.nav-links a:hover::after { left: 0; right: 0; }
#navbar.transparent .nav-links a:hover { color: #fff; }
#navbar.scrolled   .nav-links a:hover { color: var(--gold); }

/* Botão de idioma */
.lang-btn {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  padding: 5px 12px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  white-space: nowrap;
}

#navbar.scrolled .lang-btn {
  color: var(--text-muted);
  border-color: var(--border);
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--dark);
  background: var(--gold);
  border-color: var(--gold);
}

/* Hamburger mobile */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

#navbar.scrolled .nav-hamburger span {
  background: var(--dark);
}

/* =========================================================
   HERO
   ========================================================= */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  animation: kenBurns 8s ease-in-out infinite alternate;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide:nth-child(1) { animation-direction: alternate; }
.hero-slide:nth-child(2) { animation-direction: alternate-reverse; }

@keyframes kenBurns {
  from { transform: scale(1);     }
  to   { transform: scale(1.06);  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,25,23,0.52) 0%,
    rgba(26,25,23,0.38) 50%,
    rgba(26,25,23,0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 1.5rem;
}

/* Logo da hero */
.hero-logo {
  display: block;
  height: clamp(28px, 3vw, 45px);
  width: auto;
  margin: 0 auto 2rem;
  /* inverte para branco sobre o fundo escuro */
  filter: brightness(0) invert(1);
  opacity: 0;
  animation: heroLogoIn 1s var(--ease-out) 0.3s forwards;
}

@keyframes heroLogoIn {
  from { opacity: 0; transform: translateY(-22px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  max-width: 580px;
  margin: 0 auto;
  opacity: 0;
  animation: heroTextIn 1s var(--ease-out) 0.95s forwards;
}

/* Indicador de slides */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.hero-dot.active {
  background: var(--gold);
  transform: scale(1.4);
}

/* Seta scroll-down */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 0.9; transform: scaleY(0.7); }
}

/* =========================================================
   QUEM SOMOS
   ========================================================= */
#quem-somos {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 7rem;
  background: var(--bg);
}

.quem-somos-header {
  text-align: center;
  margin-bottom: 4rem;
}

.quem-somos-header .divider {
  margin: 1.5rem auto 0;
}

.qs-single {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  max-width: 820px;
  margin: 0 auto;
}

.qs-lead {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.9;
  text-align: justify;
  will-change: transform;
}

.qs-body {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.9;
  text-align: justify;
  will-change: transform;
}

.qs-body strong {
  color: var(--dark);
  font-weight: 700;
}

.qs-side-img {
  position: absolute;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.qs-side-img--left  { left: 0; top: 22%; width: clamp(220px, 20vw, 340px); }
.qs-side-img--right { right: 0; top: 58%; width: clamp(220px, 20vw, 340px); }

.qs-side-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================================================
   ADVOGADOS
   ========================================================= */
#advogados {
  padding: 7rem 0;
  background: var(--bg-alt);
}

.advogados-header {
  text-align: center;
  margin-bottom: 4rem;
}

.advogados-header .divider {
  margin: 1.5rem auto 0;
}

/* Linha dos sócios */
.socios-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

/* Grid das 3 linhas de 5 */
.advogados-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Linha in memoriam */
.memoriam-row {
  display: flex;
  justify-content: center;
}

/* Card base */
.card {
  background: #fff;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  transform: translateY(-5px);
}

.card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 10%;
  display: block;
  transition: transform 0.5s var(--ease);
}

.card:hover .card-img {
  transform: scale(1.04);
}

.card-body {
  padding: 0.85rem;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.card-name {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dark);
  position: relative;
  padding-bottom: 0.6rem;
}

.card-name::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}

.card:hover .card-name::after { width: 100%; }

.card-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Card de sócio (maior) */
.card-socio {
  width: 280px;
  flex-shrink: 0;
}

.card-socio .card-img {
  aspect-ratio: 3 / 4;
}

.card-socio .card-name {
  font-size: 0.9rem;
}

.card-socio .card-body {
  padding: 0.9rem 1rem;
}

/* Badge sócio */
.card-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 3px 8px;
  border-radius: 1px;
  background: rgba(255,255,255,0.9);
}

/* Card in memoriam */
.card-memoriam {
  width: calc((100% - 4 * 1.5rem) / 5);
  cursor: default;
}

.card-memoriam:hover {
  box-shadow: none;
  transform: none;
}

.card-memoriam .card-img {
  filter: grayscale(100%);
}

.card-memoriam .card-name::after { display: none; }

.memoriam-tag {
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.75rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
#footer {
  background: var(--dark-nav);
  color: rgba(255,255,255,0.6);
  padding: 4.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
  background-image: linear-gradient(to bottom, rgba(201,169,1,0.35), rgba(201,169,1,0.35));
  background-size: 1px 82%;
  background-position: calc(50% - 1.5rem) top;
  background-repeat: no-repeat;
}

.footer-brand img {
  height: 100px;
  filter: brightness(0) invert(1);
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.8;
  max-width: 300px;
}

.footer-col h5 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.25rem;
}

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

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.25s;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-col address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 2;
}

.footer-col address a {
  color: rgba(255,255,255,0.55);
  transition: color 0.25s;
}

.footer-col address a:hover { color: var(--gold); }

.footer-col p {
  font-size: 0.95rem;
  line-height: 2;
}

.footer-col p a {
  color: rgba(255,255,255,0.55);
  transition: color 0.25s;
}

.footer-col p a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */
@media (max-width: 1200px) {
  .qs-side-img { display: none; }

  .advogados-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .advogados-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  :root { --nav-h: 64px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    z-index: 999;
    background: var(--dark-nav);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s var(--ease), opacity 0.4s, visibility 0.4s;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #navbar.scrolled .nav-links a { color: #fff; }
  #navbar.scrolled .lang-btn {
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.3);
  }

  .nav-hamburger { display: flex; }

  .socios-row {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .card-socio { width: 100%; max-width: 320px; }

  .advogados-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    background-image: none;
  }

  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .pilares { grid-template-columns: 1fr; }
  .advogados-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .nav-logo { height: 48px; }

  #quem-somos { padding: 3rem 0 4rem; }

  .qs-single { gap: 2.5rem; }

  .qs-lead,
  .qs-body { text-align: justify; }

  #advogados { padding: 4rem 0; }

  .card-memoriam {
    width: 50%;
    max-width: 200px;
  }
}
