/* ============================================
   Marques & Mendes Advocacia
   Front-end institucional
   ============================================ */

:root {
  --black: #0d0d0d;
  --black-soft: #151515;
  --black-section: #111111;
  --gold: #b89a67;
  --gold-light: #cdb486;
  --gold-dark: #8f7448;
  --white: #f7f5f0;
  --off-white: #f2f0eb;
  --gray: #77736c;
  --gray-soft: #9a958c;
  --text-dark: #1a1814;
  --border-light: rgba(0, 0, 0, 0.12);
  --border-dark: rgba(255, 255, 255, 0.15);
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Montserrat", "Segoe UI", sans-serif;
  --container: 1180px;
  --header-h: 72px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--black);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border: 2px solid var(--black);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

::-webkit-scrollbar:horizontal {
  height: 10px;
}

::-webkit-scrollbar-corner {
  background: var(--black);
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  background: var(--gold);
  color: var(--black);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header,
.footer-brand,
.about-logo-card {
  isolation: isolate;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
}

.brand-logo-header {
  height: 54px;
  width: auto;
  max-width: 230px;
}

.brand-logo-about {
  height: 148px;
  width: auto;
  max-width: min(280px, 72vw);
}

.brand-logo-footer {
  height: 132px;
  width: auto;
  max-width: 260px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn .icon-whatsapp {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.btn-gold {
  background: var(--gold-light);
  color: var(--black);
  border-color: var(--gold-light);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
}

.btn-header {
  padding: 10px 16px;
  border-radius: 4px;
}

.btn-ghost {
  padding: 13px 20px;
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.72);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.btn-ghost-gold {
  border-color: var(--gold);
  color: #fff;
  margin-top: 8px;
}

.btn-ghost-gold:hover,
.btn-ghost-gold:focus-visible {
  background: rgba(184, 154, 103, 0.1);
  color: var(--gold-light);
}

.btn-outline {
  padding: 13px 18px;
  color: var(--text-dark);
  background: transparent;
  border-color: rgba(26, 24, 20, 0.35);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--black);
  background: rgba(0, 0, 0, 0.03);
}

.cta-actions .btn-gold {
  padding: 13px 22px;
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--black);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(184, 154, 103, 0.12);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.header-inner .brand {
  justify-self: start;
}

.header-inner .nav {
  justify-self: center;
}

.header-inner .btn-header:not(.btn-nav-mobile) {
  justify-self: end;
  grid-column: 3;
}

.header-inner .nav-toggle {
  justify-self: end;
  grid-column: 3;
  z-index: 101;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  color: rgba(247, 245, 240, 0.9);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 6px 0;
  transition: color var(--transition);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-light);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--gold-light);
}

.btn-nav-mobile {
  display: none;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open::before {
  content: "";
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 98;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--gold-light);
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }

.nav-toggle.is-open span:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 420px;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(13, 13, 13, 0.88) 0%, rgba(13, 13, 13, 0.62) 42%, rgba(13, 13, 13, 0.5) 100%),
    linear-gradient(180deg, rgba(13, 13, 13, 0.15) 0%, rgba(13, 13, 13, 0.35) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, var(--container));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 28px;
  padding-top: 28px;
}

.hero-content {
  max-width: 560px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.15rem, 3.4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.hero-title-light {
  display: block;
  color: var(--white);
}

.hero-title-gold {
  display: block;
  color: var(--gold-light);
  font-style: italic;
}

.hero-content > p {
  color: rgba(247, 245, 240, 0.78);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 26px;
}

.hero-card {
  width: 250px;
  flex-shrink: 0;
  padding: 22px 22px 20px;
  background: rgba(13, 13, 13, 0.72);
  border: 1px solid rgba(184, 154, 103, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-card-icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
  margin-bottom: 12px;
}

.hero-card p {
  color: rgba(247, 245, 240, 0.92);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.55;
}

/* ---------- Practice areas ---------- */

.practice-areas {
  background: var(--white);
  padding: 72px 0 76px;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-align: center;
  margin-bottom: 12px;
}

.section-label-left {
  text-align: left;
  color: var(--gold);
}

.practice-areas h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 2.6vw, 2.45rem);
  line-height: 1.22;
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 56px;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.practice-item {
  padding: 0 18px;
  text-align: center;
  border-right: 1px solid rgba(26, 24, 20, 0.1);
}

.practice-item:first-child {
  padding-left: 0;
}

.practice-item:last-child {
  padding-right: 0;
  border-right: none;
}

.practice-icon {
  width: 30px;
  height: 30px;
  color: var(--gold);
  margin: 0 auto 16px;
}

.practice-item h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.practice-item p {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray);
  line-height: 1.55;
}

/* ---------- About ---------- */

.about {
  background: var(--black);
  padding: 88px 0 80px;
  color: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 48px;
}

.about-content h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 2.7vw, 2.55rem);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 20px;
}

.about-lead {
  color: rgba(247, 245, 240, 0.72);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 32px;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.about-features li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.about-features svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-features h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.about-features p {
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(247, 245, 240, 0.62);
}

.about-image-wrap {
  position: relative;
  min-height: 420px;
}

.about-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.08) 0%, rgba(13, 13, 13, 0.28) 100%);
  pointer-events: none;
}

.about-image-wrap > img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  object-position: center;
}

.about-logo-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  padding: 8px 10px;
  border: 1px solid rgba(184, 154, 103, 0.35);
  z-index: 2;
  line-height: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(184, 154, 103, 0.28);
}

.stat-item {
  padding: 28px 24px 8px;
  border-right: 1px solid rgba(184, 154, 103, 0.28);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-text {
  font-size: 0.88rem;
  font-weight: 300;
  color: rgba(247, 245, 240, 0.86);
  line-height: 1.5;
}

/* ---------- CTA ---------- */

.cta {
  background: var(--off-white);
  padding: 42px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.cta-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cta-icon svg {
  width: 24px;
  height: 24px;
}

.cta-copy {
  flex: 1;
}

.cta-copy h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.cta-copy p {
  font-size: 0.84rem;
  color: var(--gray);
  font-weight: 400;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--black);
  color: rgba(247, 245, 240, 0.78);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr 1.25fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand p {
  margin-top: 18px;
  font-size: 0.84rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(247, 245, 240, 0.62);
}

.footer-col h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

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

.footer-col a {
  font-size: 0.84rem;
  font-weight: 300;
  color: rgba(247, 245, 240, 0.72);
  transition: color var(--transition);
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--gold-light);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(247, 245, 240, 0.72);
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: rgba(247, 245, 240, 0.48);
}

.footer-credit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--gold);
}

/* ---------- Reveals ---------- */

.js .practice-item,
.js .about-content,
.js .about-visual,
.js .stat-item,
.js .cta-inner {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ---------- Focus ---------- */

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.nav-link:focus-visible {
  outline-offset: 6px;
}

/* ---------- Notebook ---------- */

@media (max-width: 1439px) {
  .nav-list {
    gap: 20px;
  }

  .hero {
    height: 400px;
    min-height: 400px;
  }
}

@media (max-width: 1199px) {
  .practice-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 0;
  }

  .practice-item {
    padding: 0 20px 8px;
  }

  .practice-item:nth-child(3n) {
    border-right: none;
  }

  .practice-item:nth-child(3n + 1) {
    padding-left: 0;
  }

  .about-grid {
    gap: 40px;
  }

  .about-image-wrap > img {
    height: 400px;
  }

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

/* ---------- Tablet ---------- */

@media (max-width: 1023px) {
  :root {
    --header-h: 68px;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 auto;
    width: min(84vw, 360px);
    background: var(--black);
    border-left: 1px solid rgba(184, 154, 103, 0.2);
    padding: 32px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav.is-open {
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .nav-link {
    font-size: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .brand-logo-header {
    height: 46px;
    max-width: 186px;
  }

  .btn-header:not(.btn-nav-mobile) {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .hero-card {
    width: min(100%, 320px);
  }

  .hero-content > p br,
  .practice-areas h2 br,
  .about-content h2 br,
  .about-lead br,
  .cta-copy h2 br,
  .cta-copy p br {
    display: none;
  }

  .practice-areas {
    padding: 56px 0 60px;
  }

  .btn-nav-mobile {
    display: inline-flex;
    margin-top: 12px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image-wrap,
  .about-image-wrap > img {
    min-height: 0;
    height: 380px;
  }

  .stats {
    grid-template-columns: 1fr;
    border-top: none;
  }

  .stat-item {
    border-right: none;
    border-top: 1px solid rgba(184, 154, 103, 0.28);
    padding: 20px 0;
  }

  .cta-inner {
    flex-wrap: wrap;
  }

  .cta-actions {
    width: 100%;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

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

  .practice-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 0;
  }

  .practice-item,
  .practice-item:first-child,
  .practice-item:nth-child(3n + 1) {
    padding: 0 14px 4px;
    border-right: 1px solid rgba(26, 24, 20, 0.1);
  }

  .practice-item:nth-child(2n) {
    border-right: none;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .cta-actions {
    flex-direction: column;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  .about-image-wrap > img {
    height: 300px;
  }

  .about-logo-card {
    padding: 6px 8px;
  }

  .brand-logo-header {
    height: 40px;
    max-width: 158px;
  }

  .brand-logo-about {
    height: 112px;
    max-width: 210px;
  }

  .brand-logo-footer {
    height: 110px;
    max-width: 220px;
  }
}

@media (max-width: 479px) {
  .practice-grid {
    grid-template-columns: 1fr;
  }

  .practice-item,
  .practice-item:nth-child(2n) {
    border-right: none;
    padding: 0 0 24px;
    text-align: left;
  }

  .practice-icon {
    margin-left: 0;
  }

  .practice-item:not(:last-child) {
    border-bottom: 1px solid rgba(26, 24, 20, 0.08);
    margin-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .practice-item,
  .js .about-content,
  .js .about-visual,
  .js .stat-item,
  .js .cta-inner,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
