/*
Theme Name: Advocacia
Theme URI: https://advocacia.local
Author: Paulo Gomes da Cruz Junior
Description: Clean law firm website for Leal, Lucciola & Pitanga Advocacia.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: advocacia
*/

/* ============================================================
   Leal, Lucciola & Pitanga Advocacia — Design Tokens v3.2
   Full-bleed backgrounds (nav + dark sections) with contained content.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { max-width: 100%; height: auto; display: block; }
input, textarea, select, button { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
a { text-decoration: none; color: inherit; }

/* ---------- Design Tokens ---------- */
:root {
  --color-primary:         oklch(0.34 0.06 272);
  --color-primary-hover:   oklch(0.28 0.05 272);
  --color-accent:          oklch(0.70 0.14 92);
  --color-accent-hover:    oklch(0.62 0.12 92);
  --color-bg:              #FAF8F4;
  --color-surface:         #ffffff;
  --color-border:          oklch(0.88 0.01 80);
  --color-text:            oklch(0.22 0.02 272);
  --color-text-muted:      oklch(0.45 0.015 80);
  --color-error:           oklch(0.52 0.20 25);
  --color-success:         oklch(0.60 0.15 145);
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --fs-xs:         0.75rem;
  --fs-sm:         0.875rem;
  --fs-base:       1rem;
  --fs-md:         1.125rem;
  --fs-lg:         1.5rem;
  --fs-xl:         2rem;
  --fs-2xl:        2.5rem;
  --fs-3xl:        clamp(2rem, 4vw, 3rem);
  --fs-hero:       clamp(2.5rem, 5vw, 3.75rem);
  --space-2xs:   0.25rem;
  --space-xs:    0.5rem;
  --space-sm:    0.75rem;
  --space-md:    1rem;
  --space-lg:    1.5rem;
  --space-xl:    2rem;
  --space-2xl:   3rem;
  --space-3xl:   4rem;
  --space-4xl:   6rem;
  --radius-sm:   0.25rem;
  --radius-md:   0.5rem;
  --radius-lg:   1rem;
  --shadow-sm:   0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md:   0 4px 12px oklch(0 0 0 / 0.08);
  --shadow-lg:   0 8px 30px oklch(0 0 0 / 0.10);
  --max-w:       1200px;
  --nav-h:       72px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-lg); }
h3 { font-size: var(--fs-xl); margin-bottom: var(--space-md); }
p  { margin-bottom: var(--space-md); max-width: 65ch; }
.text-muted { color: var(--color-text-muted); }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; top: -100%; left: var(--space-md);
  padding: var(--space-xs) var(--space-md);
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius-sm); z-index: 1000; font-weight: 600;
}
.skip-link:focus { top: var(--space-md); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xl);
  border: none; border-radius: var(--radius-md);
  font-weight: 600; font-size: var(--fs-sm); cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-accent { background: var(--color-accent); color: var(--color-primary); }
.btn-accent:hover { background: var(--color-accent-hover); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { background: #1DA851; }

/* ---- Form inputs ---- */
.field {
  display: flex; flex-direction: column; gap: var(--space-2xs);
  margin-bottom: var(--space-md);
}
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: var(--space-sm) var(--space-md);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-surface); font-size: var(--fs-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(0.34 0.06 272 / 0.15);
}
.field textarea { min-height: 140px; resize: vertical; }
.field .error-msg {
  color: var(--color-error); font-size: var(--fs-xs); font-weight: 500; display: none;
}
.field.has-error input, .field.has-error textarea { border-color: var(--color-error); }
.field.has-error .error-msg { display: block; }

/* ---- Cards ---- */
.card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: var(--space-xl); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: oklch(0.70 0.14 92 / 0.15);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md); color: var(--color-primary);
}
.card--accent-top {
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ---- Accordion ---- */
.accordion details { border-bottom: 1px solid var(--color-border); }
.accordion summary {
  padding: var(--space-md) 0; cursor: pointer; font-weight: 600;
  font-size: var(--fs-md); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: '+'; font-size: 1.5em; font-weight: 400; color: var(--color-accent);
  flex-shrink: 0; margin-inline-start: var(--space-md);
}
.accordion details[open] summary::after { content: '−'; }
.accordion details .answer {
  padding-bottom: var(--space-lg); color: var(--color-text-muted); line-height: 1.7;
}

/* ---- Social icons ---- */
.social-icons { display: flex; gap: var(--space-sm); }
.social-icons a {
  width: 44px; height: 44px; border-radius: 50%;
  background: oklch(0 0 0 / 0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); transition: background 0.2s, color 0.2s;
}
.social-icons a:hover { background: var(--color-primary); color: #fff; }

/* ---- Sections ---- */
.section {
  padding-block: var(--space-4xl); max-width: var(--max-w);
  margin-inline: auto; padding-inline: var(--space-lg);
}
.section--flush { padding-inline: 0; max-width: 100%; }

/* Section--dark: full-bleed navy bg, content centered inside */
.section--dark {
  background: var(--color-primary); color: #fff;
}
.section--dark h2, .section--dark p { color: #fff; }

.section--gold-line::before {
  content: ''; display: block; width: 60px; height: 3px;
  background: var(--color-accent); margin-bottom: var(--space-2xl);
}

/* ---- Hero ---- */
.hero {
  background: var(--color-bg);
  padding-block: var(--space-4xl);
  max-width: 100%;
}
.hero-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: var(--space-lg);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl); align-items: center;
}
.hero__lead {
  display: inline-block; padding: var(--space-2xs) var(--space-sm);
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: oklch(0.70 0.14 92 / 0.2); color: var(--color-primary);
  margin-bottom: var(--space-lg);
}
.hero__cta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-xl); }
.hero__visual {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, oklch(0.85 0.03 80), oklch(0.75 0.05 80));
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); font-size: var(--fs-sm);
  text-align: center; padding: var(--space-lg); box-shadow: var(--shadow-md);
  overflow: hidden;
}
.hero__visual img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius-lg);
}

/* ---- Navbar: full-bleed background, contained content via __container ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar__container {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: var(--space-xl);
  display: flex; align-items: center; width: 100%;
}
.navbar__brand,
.navbar .custom-logo-link {
  margin-inline-end: auto;
}
.navbar__logo,
.navbar .custom-logo {
  height: 60px; width: auto; object-fit: contain;
  filter: drop-shadow(0 0 8px oklch(0.70 0.14 92 / 0.35));
  transition: filter 0.3s ease;
}
.navbar__brand:hover .navbar__logo,
.navbar .custom-logo-link:hover .custom-logo {
  filter: drop-shadow(0 0 14px oklch(0.70 0.14 92 / 0.55));
}
/* Nav links inside .navbar__links (output of wp_nav_menu) */
.navbar__links a {
  color: rgba(255,255,255,0.7);
  font-size: var(--fs-sm);
  font-weight: 500;
  position: relative;
  padding-block: var(--space-xs);
  transition: color 0.2s;
  text-decoration: none;
}
.navbar__links a:hover,
.navbar__links a[aria-current="page"],
li.current-menu-item > a {
  color: #fff;
}
.navbar__links { display: flex; gap: var(--space-xl); }
.wp-nav-menu { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--space-xl); }
.navbar__toggle {
  display: none; background: none; border: none; color: #fff;
  cursor: pointer; padding: var(--space-xs);
}
.navbar__toggle svg { width: 24px; height: 24px; }

/* ---- Footer ---- */
.footer {
  background: var(--color-primary); color: rgba(255,255,255,0.8);
  padding-block: var(--space-3xl);
}
.footer__inner {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: var(--space-lg);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2xl);
}
.footer__brand {
  font-family: var(--font-heading); font-size: 1.25rem;
  color: #fff; margin-bottom: var(--space-sm);
}
.footer__brand span { color: var(--color-accent); }
.footer img.footer__logo-img {
  height: 32px; width: auto; margin-bottom: var(--space-sm);
}
.footer h4 {
  font-family: var(--font-body); font-size: var(--fs-xs);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--color-accent); margin-bottom: var(--space-md);
}
.footer ul li { margin-bottom: var(--space-xs); }
.footer ul a { font-size: var(--fs-sm); transition: color 0.2s; }
.footer ul a:hover { color: #fff; }
.footer__bottom {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: var(--space-lg); padding-top: var(--space-xl);
  margin-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: var(--fs-xs); color: rgba(255,255,255,0.5);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md);
}

/* ---- Grid / Layout utilities ---- */
.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.twocol {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl); align-items: start;
}

/* ---- Badge ---- */
.badge {
  display: inline-block; padding: var(--space-2xs) var(--space-sm);
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-accent { background: oklch(0.70 0.14 92 / 0.15); color: var(--color-primary); }

/* ---- Toast — fully hidden by default ---- */
.toast {
  position: fixed; bottom: var(--space-xl); right: var(--space-xl);
  background: var(--color-surface);
  border-left: 4px solid var(--color-success);
  box-shadow: var(--shadow-lg); padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm); font-weight: 600; z-index: 200;
  /* Hidden: below viewport + invisible */
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0); opacity: 1; pointer-events: auto;
}

/* ---- Map embed ---- */
.map-container {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); aspect-ratio: 16 / 9;
}
.map-container iframe { width: 100%; height: 100%; border: 0; }

/* ---- Contact info cards ---- */
.contact-info { display: flex; flex-direction: column; gap: var(--space-lg); }
.contact-item { display: flex; gap: var(--space-md); align-items: flex-start; }
.contact-item__icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: oklch(0.70 0.14 92 / 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); flex-shrink: 0;
}
.contact-item__text { font-size: var(--fs-sm); }
.contact-item__label { font-weight: 600; display: block; margin-bottom: 2px; }

/* ---- Values / Sobre ---- */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.value-card {
  text-align: center; padding: var(--space-xl);
  background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.value-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.value-card__icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: oklch(0.70 0.14 92 / 0.15);
  display: flex; align-items: center; justify-content: center;
  margin-inline: auto; margin-bottom: var(--space-md); color: var(--color-primary);
}
.value-card h3 { font-size: var(--fs-lg); }

/* ---- Team photos ---- */
.team-photo {
  width: 100px; height: 100px; border-radius: 50%;
  background: oklch(0 0 0 / 0.08);
  margin-inline: auto; margin-bottom: var(--space-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); font-size: var(--fs-sm); overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---- Page hero (sub-page banner) ---- */
.page-hero {
  background: var(--color-primary); color: #fff;
  padding-block: var(--space-3xl); text-align: center;
}
.page-hero__inner {
  max-width: var(--max-w); margin-inline: auto; padding-inline: var(--space-lg);
}
.page-hero .badge-accent {
  background: oklch(0.70 0.14 92 / 0.2); color: var(--color-accent);
}

/* ---- Practice areas listing ---- */
.area-listing {
  display: flex; gap: var(--space-xl); align-items: flex-start;
  padding: var(--space-xl);
  background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--color-accent);
}
.area-listing + .area-listing { margin-top: var(--space-lg); }
.area-listing__icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: oklch(0.70 0.14 92 / 0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); flex-shrink: 0;
}
.area-listing__title {
  font-family: var(--font-heading); font-size: var(--fs-lg);
  font-weight: 700; margin-bottom: var(--space-xs);
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .navbar__container { padding-inline: var(--space-md); }
  .navbar__links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(15, 23, 42, 0.97); flex-direction: column;
    padding: var(--space-lg); gap: var(--space-md);
    transform: translateY(-100%); opacity: 0;
    pointer-events: none; transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .navbar__links.open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .navbar__toggle { display: block; }
  .twocol { grid-template-columns: 1fr; gap: var(--space-xl); }
  .section { padding-block: var(--space-2xl); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; }
  .hero-inner {
    grid-template-columns: 1fr; padding-block: var(--space-2xl);
  }
  .values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .page-hero { padding-block: var(--space-2xl); }
  .area-listing { flex-direction: column; }
}
