/* ==========================================================================
   Haefliger & Lorandi Advocacia
   ========================================================================== */

:root {
  --navy: #1a202d;
  --navy-2: #222939;
  --ink: #161922;
  --text: #181818;
  --text-soft: #373737;
  --gold: #f8d065;
  --gold-dark: #d19e14;
  --gray-100: #f7f7f7;
  --gray-200: #efefef;
  --line: #e4e4e4;
  --white: #fff;
  --whatsapp: #25d366;

  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bitter", Georgia, "Times New Roman", serif;

  --container: 1140px;
  --gutter: 20px;
  --header-h: 82px;
  --topbar-h: 38px;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(22, 25, 34, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; transition: color .2s, background-color .2s, border-color .2s, transform .2s; }
p { margin: 0 0 1.1em; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--font-head); font-weight: 700; line-height: 1.25; }

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

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 16px; background: var(--gold); color: var(--ink); font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 10px 30px;
  font: 600 15px/1.3 var(--font-body);
  color: var(--ink); background: var(--gold);
  border: 0; border-radius: 3px; cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--gold); }
.btn--lg { font-size: 16px; min-height: 50px; }

/* Top bar ---------------------------------------------------------------- */
.topbar { background: var(--navy); color: var(--white); font-size: 13px; line-height: 1; }
.topbar .container { display: flex; justify-content: flex-end; align-items: center; min-height: var(--topbar-h); }
.topbar ul { display: flex; align-items: center; }
.topbar li + li { margin-left: 12px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .6); }
.topbar a { display: inline-flex; align-items: center; gap: 8px; }
.topbar a:hover { color: var(--gold); }
.topbar .icon { color: var(--gold); width: 13px; height: 13px; }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: absolute; top: var(--topbar-h); left: 0; right: 0; z-index: 50;
  background: rgba(26, 32, 45, .55);
  backdrop-filter: blur(2px);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-fixed {
  position: fixed; top: 0;
  background: rgba(26, 32, 45, .97);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
  animation: header-in .35s var(--ease);
}
@keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }

.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

.logo img { width: 252px; height: auto; }

.nav ul { display: flex; gap: 26px; }
.nav a {
  position: relative; display: block; padding: 28px 0;
  font-size: 15px; font-weight: 500; color: var(--white); white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease);
}
.nav a:hover { color: var(--gold); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 46px; height: 46px; padding: 0; margin-right: -8px;
  background: none; border: 0; color: var(--white); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 26px; height: 2px; margin: 0 auto; background: currentColor; border-radius: 2px;
  transition: transform .25s, background-color .25s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative; display: flex; align-items: center;
  min-height: clamp(560px, calc(100svh - var(--topbar-h)), 780px);
  padding: calc(var(--header-h) + 40px) 0 60px;
  color: var(--white); background: var(--navy); overflow: hidden; isolation: isolate;
}
.hero__bg, .hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero__bg img { object-fit: cover; object-position: 70% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(22, 25, 34, .55) 0%, rgba(22, 25, 34, .25) 45%, rgba(22, 25, 34, 0) 70%);
}
.hero__content { max-width: 560px; }
.hero h1 {
  margin-bottom: 22px; color: var(--white);
  font-size: clamp(36px, 4.4vw, 56px); font-weight: 800; line-height: 1.12;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.hero p { max-width: 520px; margin-bottom: 26px; font-size: 15px; line-height: 1.75; text-shadow: 0 1px 8px rgba(0, 0, 0, .3); }

/* Page banner (inner pages) --------------------------------------------- */
.page-banner {
  position: relative; display: flex; align-items: flex-end;
  min-height: 212px; padding: calc(var(--header-h) + 20px) 0 34px;
  background: var(--navy) url("/assets/img/page-banner.webp") center / cover no-repeat;
  isolation: isolate;
}
.page-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(22, 25, 34, .2); }
.page-banner h1 { color: var(--white); font-size: clamp(30px, 3.2vw, 40px); font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }

/* Sections --------------------------------------------------------------- */
.section { padding: 90px 0; }
.section--tight { padding: 70px 0; }

.section-head { max-width: 900px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 2.6vw, 32px); font-weight: 800; }
.section-head p { margin: 0; }

.divider { display: block; width: 40px; height: 5px; margin: 22px auto 24px; background: var(--gold); border-radius: 5px; }

/* Practice-area cards ---------------------------------------------------- */
.areas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

.area-card {
  display: grid; grid-template-columns: 1fr 1fr; min-height: 250px;
  background: var(--gray-200); overflow: hidden;
  transition: box-shadow .3s, transform .3s var(--ease);
}
.area-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.area-card__media { position: relative; overflow: hidden; }
.area-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.area-card:hover .area-card__media img { transform: scale(1.05); }
.area-card__body { display: flex; flex-direction: column; padding: 24px 22px 22px 28px; }
.area-card h3 { margin-bottom: 8px; font-size: 20px; }
.area-card h3 a::after { content: ""; position: absolute; inset: 0; }
.area-card { position: relative; }
.area-card p {
  margin-bottom: 18px; color: var(--text-soft); font-size: 14.5px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.area-card .btn { position: relative; z-index: 1; margin-top: auto; align-self: stretch; }

/* Alterna a imagem para a direita na segunda linha, como no layout original */
.area-card--reverse .area-card__media { order: 2; }

/* Rich text -------------------------------------------------------------- */
.prose { max-width: var(--container); margin: 0 auto; }
.prose p { color: var(--text); }
.prose strong { font-weight: 600; }

.figure { margin: 50px auto 0; max-width: 680px; }
.figure img { width: 100%; box-shadow: var(--shadow); }

/* Team ------------------------------------------------------------------- */
.team { background: var(--gray-100); }
.member { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.member + .member { margin-top: 56px; }
.member__photo img { width: 100%; aspect-ratio: 734 / 560; object-fit: cover; }
.member__info { padding: 20px 40px; }
.member h2 { margin-bottom: 2px; font-family: var(--font-body); font-size: 22px; font-weight: 800; line-height: 1.3; text-transform: uppercase; letter-spacing: .01em; }
.member .oab { display: block; margin-bottom: 18px; color: var(--text-soft); }
.member p { margin-bottom: .9em; color: var(--text-soft); }
.member a { color: #2a6ab1; }
.member a:hover { color: var(--gold-dark); }
.member--reverse .member__photo { order: 2; }
.member--reverse .member__info { text-align: right; }

/* Area detail ------------------------------------------------------------ */
.area-detail { padding: 14px; border: 1px solid var(--line); background: var(--white); }
.area-detail img { width: 100%; aspect-ratio: 1501 / 571; object-fit: cover; }
.area-detail__body { padding: 28px 2px 8px; }
.area-detail__body p { color: var(--text-soft); }

.checklist li { position: relative; padding-left: 20px; color: var(--text-soft); line-height: 1.7; }
.checklist li + li { margin-top: 4px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg);
}

.cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px;
  margin-top: 40px; padding: 30px 34px; background: var(--navy); color: var(--white);
}
.cta-box h2 { color: var(--white); font-size: 22px; }
.cta-box p { margin: 4px 0 0; color: rgba(255, 255, 255, .8); }

.area-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.area-nav a { padding: 8px 18px; border: 1px solid var(--line); border-radius: 30px; font-size: 14px; font-weight: 500; }
.area-nav a:hover, .area-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--gold); }

/* Useful links ----------------------------------------------------------- */
.links-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; max-width: 1000px; margin: 0 auto; }
.link-card {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 300px; min-height: 82px; padding: 14px 26px;
  background: var(--navy); color: var(--white); text-align: center;
  font-size: 17px; font-weight: 500; line-height: 1.35; box-shadow: 0 3px 0 rgba(0, 0, 0, .12);
}
.link-card .icon { width: 15px; height: 15px; color: var(--gold); }
.link-card:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.link-card:hover .icon { color: var(--ink); }

/* Contact ---------------------------------------------------------------- */
.contact-info { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.contact-info > div { padding: 26px 20px 30px; text-align: center; }
.contact-info > div + div { border-left: 1px solid var(--line); }
.contact-info .icon { width: 30px; height: 30px; margin: 0 auto 18px; color: var(--gold); }
.contact-info h2 { margin-bottom: 4px; font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.contact-info p { margin: 0; line-height: 1.75; }
.contact-info a:hover { color: var(--gold-dark); }

.map { margin-top: 26px; background: var(--gray-200); }
.map iframe { width: 100%; height: 420px; border: 0; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--white); }

.footer-contact { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.footer-contact .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-top: 44px; padding-bottom: 44px; }
.footer-contact__item { display: flex; gap: 22px; }
.footer-contact__item > .icon { width: 44px; height: 44px; }
.footer-contact__item span { display: block; font-size: 13px; line-height: 1.6; }
.footer-contact__label { margin-bottom: 2px; text-transform: uppercase; letter-spacing: .02em; opacity: .9; }
.footer-contact__item strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.6; }
.footer-contact__item a:hover { color: var(--gold); }

.footer-widgets .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.footer-widgets .widget { padding: 46px 26px 54px; }
.footer-widgets .widget:first-child { padding-left: 0; }
.footer-widgets .widget + .widget { border-left: 1px solid rgba(255, 255, 255, .07); }
.widget h2 { margin-bottom: 18px; color: var(--gold); font-size: 18px; font-weight: 700; }
.widget p { font-size: 14.5px; }
.widget strong { font-weight: 600; }
.widget .menu li + li { margin-top: 6px; }
.widget .menu a { display: inline-flex; align-items: center; gap: 12px; font-size: 14.5px; }
.widget .menu a::before {
  content: ""; width: 6px; height: 6px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg);
}
.widget .menu a:hover { color: var(--gold); }
.widget iframe { width: 100%; max-width: 260px; height: 220px; border: 0; background: var(--navy-2); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .07); }
.footer-bottom p { margin: 0; padding: 28px 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .45); }

/* WhatsApp --------------------------------------------------------------- */
.whatsapp {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
}
.whatsapp__label {
  padding: 6px 12px; background: var(--white); color: var(--ink); font-size: 14px; line-height: 1.4;
  border-radius: 5px; box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.whatsapp__btn {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--whatsapp); color: var(--white); box-shadow: 0 4px 16px rgba(37, 211, 102, .45);
  animation: pulse 2.6s infinite;
}
.whatsapp__btn .icon { width: 30px; height: 30px; }
.whatsapp:hover .whatsapp__btn { transform: scale(1.06); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Scam alert dialog ------------------------------------------------------ */
.alert-dialog {
  width: min(620px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0;
  border: 4px solid var(--ink); border-radius: 2px; background: var(--white); overflow: visible;
}
.alert-dialog::backdrop { background: rgba(10, 12, 18, .72); }
.alert-dialog[open] { animation: dialog-in .3s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.alert-dialog__inner { padding: 14px 20px 22px; max-height: calc(100svh - 40px); overflow: auto; outline: none; }
.alert-dialog h2 { margin-bottom: 14px; font-family: var(--font-body); font-size: 24px; font-weight: 400; }
.alert-dialog img { width: 100%; max-width: 300px; margin: 0 auto; }
.alert-dialog__close {
  position: absolute; top: -16px; right: -16px; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; border: 2px solid var(--white); border-radius: 50%;
  background: var(--ink); color: var(--white); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.alert-dialog__close .icon { width: 14px; height: 14px; }
.alert-dialog__close:hover { background: var(--gold); color: var(--ink); }

/* Cookie notice ---------------------------------------------------------- */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(26, 32, 45, .96); color: rgba(255, 255, 255, .9); font-size: 13px; line-height: 1.5;
}
.cookie .container { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.cookie p { margin: 0; }
.cookie .btn { min-height: 34px; padding: 6px 16px; font-size: 13px; }
.cookie[hidden] { display: none; }

/* 404 -------------------------------------------------------------------- */
.not-found { text-align: center; }
.not-found .big { font-family: var(--font-head); font-size: 110px; font-weight: 800; line-height: 1; color: var(--gold); }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav ul { gap: 20px; }
  .logo img { width: 220px; }
  .areas { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
}

@media (max-width: 960px) {
  :root { --header-h: 70px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .08);
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .35s var(--ease), visibility 0s .35s;
  }
  .nav.is-open { max-height: 420px; visibility: visible; transition: max-height .35s var(--ease); }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 13px 0; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--gold); }

  .site-header.is-open { background: var(--navy); }

  .footer-contact .container { grid-template-columns: 1fr; gap: 26px; }
  .footer-widgets .container { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets .widget { padding: 36px 20px 36px 0; }
  .footer-widgets .widget + .widget { border-left: 0; }
  .footer-widgets .widget:nth-child(even) { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .07); }

  .contact-info { grid-template-columns: repeat(2, 1fr); }
  .contact-info > div:nth-child(3) { border-left: 0; }
  .contact-info > div:nth-child(n+3) { border-top: 1px solid var(--line); }

  .member { grid-template-columns: 1fr; }
  .member--reverse .member__photo { order: 0; }
  .member__info, .member--reverse .member__info { padding: 28px 24px 8px; text-align: left; }
  .member + .member { margin-top: 40px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }

  .topbar { font-size: 12px; }
  .topbar .container { justify-content: center; }
  .topbar .email-text { display: none; }

  .logo img { width: 190px; }

  .hero { min-height: 560px; padding-bottom: 50px; }
  .hero__bg img { object-position: 78% center; }
  .hero::before { background: linear-gradient(180deg, rgba(22, 25, 34, .55) 0%, rgba(22, 25, 34, .78) 100%); }

  .page-banner { min-height: 170px; padding-bottom: 24px; }

  .section { padding: 60px 0; }
  .section--tight { padding: 50px 0; }
  .section-head { margin-bottom: 32px; }

  .area-card, .area-card--reverse { grid-template-columns: 1fr; }
  .area-card__media { aspect-ratio: 16 / 10; }
  .area-card--reverse .area-card__media { order: 0; }
  .area-card__body { padding: 22px; }

  .link-card { width: 100%; }

  .contact-info { grid-template-columns: 1fr; }
  .contact-info > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .map iframe { height: 340px; }

  .cta-box { padding: 26px 22px; }
  .cta-box .btn { width: 100%; }

  .footer-widgets .container { grid-template-columns: 1fr; }
  .footer-widgets .widget, .footer-widgets .widget:nth-child(even) { padding: 30px 0; border-left: 0; }
  .footer-widgets .widget + .widget { border-top: 1px solid rgba(255, 255, 255, .07); }
  .widget iframe { max-width: none; }

  .whatsapp { right: 16px; bottom: 16px; }
  .whatsapp__label { display: none; }
  .cookie .container { flex-direction: column; gap: 10px; text-align: center; }
  body.has-cookie .whatsapp { bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
