/* ============================================
   ANTONIO BACELAR - ADVOCACIA E CONSULTORIA
   Premium Legal Website - Modern Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg: #fbf8f4;
  --paper: #fffdf9;
  --ink: #22130d;
  --muted: #6f5d51;
  --gold: #c99a6b;
  --gold-soft: #ead3bd;
  --brown: #3a2116;
  --brown-deep: #20100a;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(34, 19, 13, 0.13);
  --shadow-sm: 0 8px 30px rgba(34, 19, 13, 0.08);
  --shadow-lg: 0 32px 80px rgba(34, 19, 13, 0.18);
  --radius: 28px;
  --radius-sm: 16px;
  --radius-lg: 36px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

/* --- Container --- */
.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(251, 248, 244, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 154, 107, 0.12);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(251, 248, 244, 0.95);
  box-shadow: 0 4px 30px rgba(34, 19, 13, 0.06);
}

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

.brand {
  display: block;
  flex-shrink: 0;
  max-width: 180px;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 60px;
  object-fit: contain;
  transition: opacity var(--transition);
}

.brand:hover img {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--gold);
}

.nav-cta {
  padding: 12px 24px;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  color: var(--brown);
  font-weight: 600;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 154, 107, 0.3);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  gap: 6px;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--brown);
  display: block;
  transition: all var(--transition);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  position: relative;
  padding: 150px 0 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 14%, rgba(201, 154, 107, 0.22), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(201, 154, 107, 0.08), transparent 25%),
    linear-gradient(135deg, #fffdf9 0%, #f4e8dd 100%);
  z-index: -2;
}

.hero-bg::after {
  content: 'AB';
  position: absolute;
  right: -70px;
  bottom: -180px;
  font-family: var(--font-display);
  font-size: 32vw;
  color: rgba(201, 154, 107, 0.06);
  font-weight: 700;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
  margin: 0 0 16px;
}

.hero h1,
.section h2,
.cta h2 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  color: var(--brown);
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  max-width: 850px;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin: 26px 0 38px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 16px 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #9a673d, var(--gold));
  color: var(--white);
  box-shadow: 0 16px 35px rgba(154, 103, 61, 0.24);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(154, 103, 61, 0.32);
}

.btn.secondary {
  border: 1.5px solid rgba(58, 33, 22, 0.22);
  color: var(--brown);
  background: transparent;
}

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

.btn.light {
  background: var(--white);
  color: var(--brown);
}

.btn.light:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

/* --- Hero Card --- */
.hero-card {
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid rgba(201, 154, 107, 0.28);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-card img {
  width: 100%;
  max-width: 340px;
  margin: auto;
}

.card-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px 0;
}

.hero-card p {
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-card strong {
  color: var(--brown);
}

.hero-card a {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.hero-card a:hover {
  border-bottom-color: var(--gold);
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  padding: 38px 0;
  background: var(--white);
  border-block: 1px solid rgba(201, 154, 107, 0.15);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-grid div {
  font-weight: 700;
  color: var(--brown);
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 14px;
}

.trust-grid span {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  min-width: 32px;
}

/* ============================================
   SECTIONS (General)
   ============================================ */
.section {
  padding: 110px 0;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.section h2,
.cta h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.text-block {
  font-size: 1.05rem;
  color: var(--muted);
}

.text-block p {
  margin-bottom: 18px;
}

.text-block p:last-child {
  margin-bottom: 0;
}

/* ============================================
   DARK SECTION (Practice Areas)
   ============================================ */
.dark {
  background: linear-gradient(160deg, #20100a 0%, #3a2116 50%, #2a160f 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.dark::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 154, 107, 0.08), transparent 70%);
  pointer-events: none;
}

.dark h2,
.dark .eyebrow {
  color: var(--white);
}

.center {
  text-align: center;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 50px;
}

.section-heading.center {
  margin-inline: auto;
}

/* --- Practice Cards --- */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.practice-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 38px;
  min-height: 280px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.practice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  border-radius: 0 0 4px 0;
  transition: height var(--transition);
}

.practice-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(201, 154, 107, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.practice-card:hover::before {
  height: 100%;
}

.practice-card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(201, 154, 107, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 1.5rem;
}

.practice-card h3,
.feature h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: var(--white);
}

.practice-card p {
  color: rgba(234, 223, 215, 0.85);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ============================================
   FEATURES / DIFERENCIAIS
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  background: var(--paper);
  border: 1px solid rgba(201, 154, 107, 0.18);
  border-radius: var(--radius-sm);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
}

.feature::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 3px;
  transition: width var(--transition);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(201, 154, 107, 0.3);
}

.feature:hover::after {
  width: 60%;
}

.feature .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(201, 154, 107, 0.12), rgba(201, 154, 107, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.feature h3 {
  font-size: 1.2rem;
  color: var(--brown);
}

.feature p {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
  padding: 80px 0;
}

.cta-box {
  background: linear-gradient(135deg, #9a673d 0%, #2a160f 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 70%);
  pointer-events: none;
}

.cta h2,
.cta .eyebrow {
  color: var(--white);
}

.cta-box p {
  color: rgba(255, 255, 255, 0.8);
}

.cta-box .btn {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 50px 0 40px;
  background: #160b07;
  color: #d8c8bd;
}

.footer-grid {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 32px;
  align-items: center;
}

.footer img {
  width: 170px;
  filter: brightness(1.15);
}

.footer p {
  margin: 3px 0;
  font-size: 0.92rem;
}

.footer a {
  color: var(--white);
  font-weight: 500;
  transition: color var(--transition);
}

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 154, 107, 0.15);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(216, 200, 189, 0.5);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
  z-index: 900;
  transition: all var(--transition);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  display: block;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 48px;
  height: 48px;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 900;
  box-shadow: 0 4px 16px rgba(58, 33, 22, 0.3);
  font-size: 1.2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold);
  transform: translateY(-3px);
}

/* ============================================
   PAGE LOAD ANIMATION
   ============================================ */
body.loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-content .loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brown);
  font-weight: 700;
  margin-bottom: 24px;
}

.loader-bar {
  width: 120px;
  height: 3px;
  background: rgba(201, 154, 107, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  animation: loaderSlide 1s ease-in-out infinite;
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 90px 0;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 900px)
   ============================================ */
@media (max-width: 900px) {
  .navbar {
    height: 76px;
  }

  .brand {
    max-width: 150px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 4%;
    right: 4%;
    background: var(--paper);
    border: 1px solid rgba(201, 154, 107, 0.22);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    animation: menuSlide 0.3s ease;
  }

  @keyframes menuSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(201, 154, 107, 0.1);
  }

  .nav-links a:last-child {
    border-bottom: none;
    margin-top: 8px;
  }

  .nav-cta {
    text-align: center;
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .hero-grid,
  .split,
  .practice-grid,
  .trust-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    order: -1;
  }

  .footer-grid {
    justify-items: start;
    text-align: left;
  }

  .cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 32px;
  }

  .hero-actions .btn {
    width: 100%;
  }

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

  .trust-grid {
    gap: 18px;
  }

  .section {
    padding: 76px 0;
  }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: 20px;
    right: 20px;
  }

  .back-to-top {
    bottom: 86px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (max-width: 520px)
   ============================================ */
@media (max-width: 520px) {
  .section {
    padding: 60px 0;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-card {
    padding: 24px;
  }

  .cta-box {
    padding: 32px 24px;
    border-radius: 24px;
  }

  .brand {
    max-width: 130px;
  }

  .section h2 {
    font-size: 1.7rem;
  }

  .practice-card {
    padding: 28px;
    min-height: auto;
  }

  .feature {
    padding: 24px;
  }

  .split {
    gap: 40px;
  }

  .trust-grid div {
    font-size: 0.9rem;
  }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
