/* ============================================================
   PORTFÓLIO ADVOCACIA - DESIGN FORMAL
   Tema claro e escuro via variáveis CSS
   ============================================================ */

/* ---------- Variáveis de Tema ---------- */
:root,
[data-theme="claro"] {
  /* Cores principais */
  --bg: #f7f5f2;
  --bg-alt: #efece7;
  --surface: #ffffff;
  --surface-alt: #fbfaf8;
  --text: #1f2429;
  --text-muted: #5c636b;
  --heading: #16232e;

  /* Marca dourada (clássico da advocacia) */
  --accent: #9a7b3c;
  --accent-dark: #7c6129;
  --accent-soft: rgba(154, 123, 60, 0.12);

  /* Bordas */
  --border: #e3ddd4;
  --border-strong: #d3cabc;

  /* Sombras */
  --shadow: 0 10px 30px rgba(22, 35, 46, 0.08);
  --shadow-sm: 0 4px 14px rgba(22, 35, 46, 0.06);

  /* Fundo do hero (pattern sutil) */
  --hero-overlay: rgba(23, 34, 45, 0.72);
}

[data-theme="escuro"] {
  --bg: #10161c;
  --bg-alt: #141b23;
  --surface: #1a222b;
  --surface-alt: #202a34;
  --text: #e6e9ec;
  --text-muted: #aab4bd;
  --heading: #f2f4f6;

  --accent: #c9a75c;
  --accent-dark: #dab878;
  --accent-soft: rgba(201, 167, 92, 0.14);

  --border: #2c3a46;
  --border-strong: #3a4a58;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);

  --hero-overlay: rgba(10, 15, 21, 0.78);
}

/* ---------- Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Georgia", "Times New Roman", serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: var(--heading);
  font-variant: small-caps;
}

.brand::first-letter {
  color: var(--accent);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

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

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botão de tema */
.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--heading);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="claro"] .icon-moon { display: none; }
[data-theme="escuro"] .icon-sun { display: none; }

/* Botão menu mobile */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--heading);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- Hero / Início ---------- */
.hero {
  position: relative;
  padding: 150px 0 110px;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/images/justica-real.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* overlay escuro para leitura */
  background-color: #10161c;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.profile {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

/* Foto de perfil */
.profile-photo {
  width: 260px;
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(22, 35, 46, 0.55), rgba(22, 35, 46, 0.7)),
    url('/images/justica2.svg') center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.photo-placeholder .scales {
  font-size: 3rem;
  line-height: 1;
}

.placeholder-text {
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
}

.profile-info {
  flex: 1;
  min-width: 280px;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  font-family: "Gill Sans", "Trebuchet MS", sans-serif;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-role {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Botões */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  font-family: "Gill Sans", "Trebuchet MS", sans-serif;
  letter-spacing: 0.5px;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.btn-whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 53px;
  height: 53px;
  border-radius: 4px;
  background: #25d366;
  color: #fff;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.btn-whatsapp-icon .social-icon {
  width: 22px;
  height: 22px;
}

.btn-whatsapp-icon:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
}

/* ---------- Seções genéricas ---------- */
.section {
  padding: 90px 0;
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  font-family: "Gill Sans", "Trebuchet MS", sans-serif;
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.2rem;
  color: var(--heading);
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  padding-bottom: 18px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.9;
}

/* ---------- Sobre ---------- */
.about .container {
  max-width: 900px;
  text-align: center;
}

.about .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.about .section-text {
  margin: 0 auto;
  text-align: center;
  /* mantém as quebras de linha digitadas no painel */
  white-space: pre-line;
}

/* ---------- Serviços ---------- */
.services .section-eyebrow,
.services .section-title {
  text-align: center;
}

.services .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 38px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

html.js .service-card.reveal.revealed {
  transform: translateY(0);
}

html.js .service-card.reveal.revealed:hover {
  transform: translateY(-8px) scale(1.02);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.service-icon svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  background: var(--accent);
  color: #fff;
}

.service-card:hover .service-icon svg {
  transform: scale(1.12);
}

.service-title {
  font-size: 1.2rem;
  color: var(--heading);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------- Horários ---------- */
.schedule .section-eyebrow,
.schedule .section-title {
  text-align: center;
}

.schedule .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.schedule-list {
  max-width: 640px;
  margin: 20px auto 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-item:nth-child(even) {
  background: var(--surface-alt);
}

.schedule-day {
  font-weight: 600;
  color: var(--heading);
}

.schedule-time {
  color: var(--text-muted);
}

.schedule-note {
  text-align: center;
  margin-top: 40px;
}

.schedule-note p {
  margin-bottom: 20px;
  color: var(--text-muted);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.btn-whatsapp .social-icon {
  width: 18px;
  height: 18px;
}

.btn-whatsapp:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
}

/* ---------- Footer / Contato ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 70px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer h3 {
  font-size: 1.4rem;
  color: var(--heading);
  margin-bottom: 12px;
  font-variant: small-caps;
}

.footer h4 {
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: "Gill Sans", "Trebuchet MS", sans-serif;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

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

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 4px;
  font-weight: 600;
  color: #fff;
  font-family: "Gill Sans", "Trebuchet MS", sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  justify-content: center;
}

.btn-social.whatsapp {
  background: #25d366;
}

.btn-social.whatsapp:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
}

.btn-social.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.btn-social.instagram:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Responsivo ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-links.open {
    max-height: 400px;
    padding: 14px 24px;
  }

  .nav-links a {
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 130px 0 80px;
  }

  .profile {
    flex-direction: column;
    text-align: center;
    gap: 34px;
  }

  .profile-photo {
    width: 200px;
    height: 250px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-cta {
    justify-content: center;
  }

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

/* ============================================================
   ANIMAÇÃO DE REVEAL (elementos aparecem ao rolar a página)
   Somente ativada quando o JS (classe .js no <html>) está presente
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

html.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Escalonamento em cascata dos cards de serviço */
html.js .services-grid .service-card.reveal:nth-child(1) { transition-delay: 0ms; }
html.js .services-grid .service-card.reveal:nth-child(2) { transition-delay: 120ms; }
html.js .services-grid .service-card.reveal:nth-child(3) { transition-delay: 240ms; }
html.js .services-grid .service-card.reveal:nth-child(4) { transition-delay: 360ms; }
html.js .services-grid .service-card.reveal:nth-child(5) { transition-delay: 480ms; }

/* Delay das itens da seção "Sobre" que pertencem ao mesmo bloco */
html.js .about h2.section-title.reveal { transition-delay: 100ms; }
html.js .about p.section-text.reveal { transition-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
