/* ============ RESET ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============ DESIGN SYSTEM ============ */
:root {
  --bg: #0a2530;
  --bg-deep: #06181f;
  --ink: #f3eee3;
  --muted: rgba(243, 238, 227, 0.60);
  --faint: rgba(243, 238, 227, 0.40);
  --gold: #e8c876;
  --gold-soft: #cdb88f;
  --line: rgba(232, 200, 118, 0.22);
  --hair: rgba(243, 238, 227, 0.12);
  --panel: rgba(255, 255, 255, 0.035);
  --paint-op: 0.4;

  --font-serif: 'EB Garamond', serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  font-size: 16px;
}

section[id] {
  scroll-margin-top: 84px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(232, 200, 118, 0.28);
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 10000;
  padding: 10px 14px;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* ============ ANIMATIONS ============ */
@keyframes gsiaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes gsiaFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
}

h1 { font-size: clamp(2.9rem, 7vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.8vw, 1.8rem); }

p {
  font-size: 1rem;
  line-height: 1.7;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

em {
  font-style: italic;
}

/* ============ NAVIGATION ============ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(10, 37, 48, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
  transition: transform 0.35s ease;
  will-change: transform;
}

nav.nav-hidden {
  transform: translateY(-100%);
}

nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

nav .logo img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

nav .logo {
  flex-shrink: 0;
}

nav .logo span {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Hide the logo + firm name entirely when they can't share one line with
   the menu links (toggled by nav-scroll.js). */
nav.logo-hidden .logo {
  display: none;
}

nav.logo-hidden {
  justify-content: center;
}

/* Measurement state: force the links onto one rigid line so the script can
   tell whether the logo + links overflow the bar. */
nav.nav-measuring .nav-links {
  flex-wrap: nowrap;
  flex-shrink: 0;
}

nav .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 40px);
}

nav .nav-links a {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

nav .nav-links a:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

nav .nav-links a.cta {
  color: var(--gold);
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

nav .nav-links a.cta:hover {
  background: var(--gold);
  color: var(--bg-deep);
  border-color: var(--gold);
}

nav .nav-links a.lang-toggle {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}

nav .nav-links a.lang-toggle:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ============ HERO ============ */
header {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px clamp(20px, 5vw, 64px) 64px;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to top, rgba(10, 37, 48, 0.5), rgba(10, 37, 48, 0.5)), image-set(url('images/bg-pt.webp') type('image/webp'), url('images/bg-pt.jpg') type('image/jpeg'));
  background-position: 0% 0%, center;
  background-repeat: repeat, cover;
  background-size: auto, cover;
}

html[lang="en"] header::before {
  background-image: linear-gradient(to top, rgba(10, 37, 48, 0.5), rgba(10, 37, 48, 0.5)), image-set(url('images/bg-en.webp') type('image/webp'), url('images/bg-en.jpg') type('image/jpeg'));
}

header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 78% 64% at 50% 42%, transparent 0%, rgba(10, 37, 48, 0.62) 52%, var(--bg) 86%), linear-gradient(to bottom, var(--bg) 0%, transparent 24%, transparent 62%, var(--bg) 100%);
  pointer-events: none;
}

header > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-emblema {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0, 0, 0, 0.45);
  animation: gsiaFloat 7s ease-in-out infinite;
  margin-bottom: 30px;
  margin-top: 30px;
}

.hero-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  padding-left: 0.42em;
}

.hero-tagline {
  max-width: 640px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.5;
  margin-bottom: 14px;
}

.hero-description {
  max-width: 560px;
  font-size: 0.98rem;
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 2px;
  transition: opacity 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-block;
}

.btn.primary {
  color: var(--bg-deep);
  background: var(--gold);
}

.btn.primary:hover {
  opacity: 0.86;
}

.btn.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--faint);
}

.hero-scroll span:first-child {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-scroll span:last-child {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ============ SECTIONS ============ */
section {
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}

section#atuacao,
section#contato,
section#areas,
section#contact {
  background: var(--bg-deep);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}

.section-note {
  max-width: 760px;
  margin-top: clamp(36px, 5vw, 56px);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-soft);
}

.section-note.indented {
  max-width: 720px;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

/* ============ SECTION HEADER ============ */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-number {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold);
}

.section-line {
  width: 46px;
  height: 1px;
  background: var(--line);
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ GRID LAYOUTS ============ */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-top: clamp(36px, 5vw, 56px);
}

.pillar {
  background: var(--bg);
  padding: 38px 32px;
  transition: background 0.3s;
}

.pillar:hover {
  background: var(--panel);
}

.pillar-icon {
  width: 30px;
  height: 30px;
  stroke: var(--gold);
  stroke-width: 1.2;
  margin-bottom: 24px;
}

.pillar-number {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--faint);
}

.pillar h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.pillar p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ============ PRACTICE AREAS ============ */
.practice-areas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-top: clamp(44px, 6vw, 72px);
}

.practice-area {
  background: var(--bg-deep);
  padding: clamp(32px, 4vw, 48px);
  transition: background 0.3s;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.practice-area:hover {
  background: var(--bg);
}

.practice-area svg {
  width: 34px;
  height: 34px;
  stroke: var(--gold);
  stroke-width: 1.1;
  flex: none;
  margin-top: 4px;
}

.practice-area h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.practice-area .badge {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  margin-left: 8px;
}

.practice-area p {
  font-size: 0.98rem;
  color: var(--muted);
}

.practice-detail-grid,
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(24px, 4vw, 36px);
  border: 1px solid var(--hair);
  background: var(--hair);
}

.practice-detail,
.privacy-item {
  min-width: 0;
  padding: clamp(28px, 4vw, 40px);
  background: var(--bg-deep);
}

.detail-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.practice-detail h3,
.privacy-item h3 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

.practice-detail p,
.privacy-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ TEAM ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(44px, 6vw, 64px);
}

.team-role-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.profile {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.profile picture {
  flex: none;
}

.profile img {
  width: 120px;
  height: 150px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line);
  flex: none;
  filter: grayscale(0.2);
}

.profile h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 6px;
}

.profile .title {
  font-size: 0.92rem;
  color: var(--gold-soft);
  margin-bottom: 4px;
}

.profile .oab {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s;
}

.social-links a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.social-links svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============ CURRICULUM ============ */
.curriculum {
  display: flex;
  flex-direction: column;
}

.curriculum-item {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
}

.curriculum-item:last-child {
  border-bottom: 1px solid var(--hair);
}

.curriculum-number {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--faint);
  flex: none;
  width: 24px;
}

.curriculum-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--ink);
}

.curriculum-item p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ============ CTA BANNER ============ */
.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(28px, 4vw, 40px);
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 2px;
}

.cta-banner h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.cta-banner p {
  font-size: 0.96rem;
  color: var(--muted);
}

.cta-banner .links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============ CONTACT SECTION ============ */
.contact-section {
  background: var(--bg-deep);
}

.contact-shell {
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}

.contact-intro {
  max-width: 760px;
  margin-bottom: clamp(44px, 6vw, 64px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(36px, 5vw, 56px);
  align-items: start;
  margin-top: clamp(44px, 6vw, 64px);
}

.units-panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hair);
  border-radius: 2px;
  overflow: hidden;
}

.unit {
  background: var(--bg-deep);
  padding: 30px 28px;
  opacity: 0.66;
  border-top: 1px solid var(--hair);
}

.unit.active {
  opacity: 1;
  border-top: none;
}

.unit-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.location-icon {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  color: var(--gold);
  flex: none;
}

.unit h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.35rem;
}

.unit .address {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.unit .phone {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
  margin-top: 10px;
}

.unit .phone .label {
  color: var(--gold-soft);
}

.badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 2px;
}

.contact-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
}

.warning-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 26px;
  background: rgba(232, 200, 118, 0.08);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.warning-box svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  flex: none;
  margin-top: 2px;
}

.warning-box p {
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form .cf-turnstile {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.form-status {
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(232, 200, 118, 0.08);
}

.form-status.visible {
  display: block;
}

.form-status.success {
  border-color: rgba(113, 202, 157, 0.65);
  background: rgba(113, 202, 157, 0.12);
}

.form-status.error {
  border-color: rgba(255, 129, 129, 0.62);
  background: rgba(255, 129, 129, 0.1);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 2px;
  padding: 14px 16px;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(232, 200, 118, 0.08);
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: rgba(255, 129, 129, 0.8);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--faint);
}

.field-error {
  min-height: 1.2em;
  color: #ffb4b4;
  font-size: 0.82rem;
  line-height: 1.35;
}

.checkbox-error {
  margin-top: -8px;
}

.consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.consent-label a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.consent-label a:focus-visible {
  outline-offset: 2px;
}

.consent-label input {
  margin-top: 3px;
  accent-color: var(--gold);
  flex: none;
  width: auto;
}

.privacy-modal {
  width: min(940px, calc(100vw - 32px));
  max-height: min(82vh, 780px);
  margin: auto;
  padding: 0;
  /* The dialog itself never scrolls — the single scrollbar lives on the
     inner panel, which avoids the double scrollbar. */
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-deep);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.privacy-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.privacy-modal-panel {
  position: relative;
  max-height: inherit;
  overflow: auto;
  padding: clamp(28px, 4vw, 48px);
}

.privacy-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.privacy-modal-close:hover {
  background: rgba(232, 200, 118, 0.08);
}

.privacy-modal h2 {
  margin-bottom: 18px;
}

.privacy-modal > p,
.privacy-modal-panel > p {
  max-width: 760px;
  color: var(--muted);
}

#privacy-modal-summary {
  margin-bottom: 24px;
}

.privacy-modal-panel .privacy-grid {
  margin-top: 0;
}

/* ============ FLOATING PANEL ============ */
:root {
  --panel-btn-closed-size: 2.3333rem;
  --panel-btn-open-size: 1.8333rem;
  --panel-btn-gap: 1rem;
  --panel-svg-closed-size: 1rem;
  --panel-svg-open-size: 0.75rem;
}

.floating-contact-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--panel-btn-closed-size);
  height: var(--panel-btn-closed-size);
}

.floating-contact-panel .panel-btn {
  position: absolute;
  bottom: 0;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--panel-btn-open-size);
  height: var(--panel-btn-open-size);
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  color: #fff;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease, width 0.4s ease, height 0.4s ease;
  cursor: pointer;
  user-select: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-touch-callout: none;
}

.floating-contact-panel .panel-btn svg {
  width: var(--panel-svg-open-size);
  height: var(--panel-svg-open-size);
  transition: width 0.4s ease, height 0.4s ease;
}

.floating-contact-panel .toggle-btn {
  z-index: 30;
  width: var(--panel-btn-closed-size);
  height: var(--panel-btn-closed-size);
  opacity: 1;
  pointer-events: auto;
}

.floating-contact-panel .toggle-btn .icon-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transform: rotate(-180deg);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-contact-panel .toggle-btn svg {
  position: absolute;
  top: calc(50% - var(--panel-svg-closed-size) / 2);
  left: calc(50% - var(--panel-svg-closed-size) / 2);
  width: var(--panel-svg-closed-size);
  height: var(--panel-svg-closed-size);
  transition: opacity 0.4s ease, transform 0.4s ease, width 0.4s ease, height 0.4s ease, top 0.4s ease, left 0.4s ease;
}

.floating-contact-panel .toggle-btn .icon-help {
  opacity: 1;
  transform: rotate(0deg);
}

.floating-contact-panel .toggle-btn .icon-close {
  opacity: 0;
}

.floating-contact-panel.show-logo:not(.open) .toggle-btn .icon-help {
  opacity: 0;
  transform: rotate(180deg);
}

.floating-contact-panel.show-logo:not(.open) .toggle-btn .icon-logo {
  opacity: 1;
  transform: rotate(0deg);
}

.floating-contact-panel.open .toggle-btn {
  width: var(--panel-btn-open-size);
  height: var(--panel-btn-open-size);
  transform: rotate(360deg);
}

.floating-contact-panel.open .toggle-btn svg {
  top: calc(50% - var(--panel-svg-open-size) / 2);
  left: calc(50% - var(--panel-svg-open-size) / 2);
  width: var(--panel-svg-open-size);
  height: var(--panel-svg-open-size);
}

.floating-contact-panel.open .toggle-btn .icon-help,
.floating-contact-panel.open .toggle-btn .icon-logo {
  opacity: 0;
}

.floating-contact-panel.open .toggle-btn .icon-logo {
  transform: rotate(180deg);
}

.floating-contact-panel.open .toggle-btn .icon-close {
  opacity: 1;
}

.floating-contact-panel.open .panel-btn {
  opacity: 1;
  pointer-events: auto;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, width 0.4s ease, height 0.4s ease;
}

/* Every fan button (lang, nav sections, call, email) is positioned by its
   --fan-index, set inline by floating-panel.js. Index 1 sits closest to the
   toggle and they stack upward in order. */
.floating-contact-panel.open .panel-btn[data-fan-index] {
  transform: translateY(calc(var(--fan-index, 0) * -1 * (var(--panel-btn-open-size) + var(--panel-btn-gap))));
}

.floating-contact-panel .panel-btn:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
}

.floating-contact-panel .panel-btn:active {
  transform: scale(0.95);
}

.floating-contact-panel:not(.open) .toggle-btn {
  animation: soft-pulse-btn 3s infinite ease-in-out;
}

@keyframes soft-pulse-btn {
  0%, 100% {
    border-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  }

  50% {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(232, 200, 118, 0.35), 0 4px 15px rgba(0, 0, 0, 0.35);
  }
}

.floating-contact-panel .panel-btn,
.floating-contact-panel.open .panel-btn {
  transition-delay: 0s;
}

.floating-contact-panel .panel-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  z-index: 100;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(232, 200, 118, 0.2);
  border-radius: 0.25rem;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-contact-panel .panel-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + 6px);
  z-index: 100;
  border-width: 4px 0 4px 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(15, 23, 42, 0.95);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
  .floating-contact-panel .panel-btn:hover::after,
  .floating-contact-panel .panel-btn:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.floating-contact-panel .panel-btn.show-tooltip::after,
.floating-contact-panel .panel-btn.show-tooltip::before {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg-deep);
  padding: clamp(56px, 7vw, 80px) clamp(20px, 5vw, 64px) 40px;
  text-align: center;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-content {
  margin-bottom: 50px;
}

.footer-logo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
  margin-bottom: 22px;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.footer-oab {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: -2px;
  margin-bottom: 14px;
}

.footer-services {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 28px;
}


.footer-copyright {
  font-size: 0.74rem;
  color: var(--faint);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  :root {
    --panel-btn-closed-size: 3.27rem;
    --panel-btn-open-size: 2.59rem;
    --panel-btn-gap: 0.82rem;
    --panel-svg-closed-size: 1.36rem;
    --panel-svg-open-size: 1.02rem;
  }

  nav .nav-links {
    gap: 12px;
  }

  .floating-contact-panel {
    right: 16px;
    bottom: 16px;
  }

  .practice-areas {
    grid-template-columns: 1fr;
  }

  .practice-detail-grid,
  .privacy-grid {
    grid-template-columns: 1fr;
  }

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

  .cta-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 600px) {
  nav {
    padding: 14px 20px;
  }

  .section-note.indented {
    margin-left: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============ UTILITY ============ */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.mt { margin-top: clamp(36px, 5vw, 56px); }

.not-found-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: clamp(48px, 8vw, 96px) 24px;
  text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% 35%, rgba(232, 200, 118, 0.1), transparent 58%), var(--bg);
}

.not-found-page h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.not-found-page p:not(.section-label) {
  max-width: 520px;
  color: var(--muted);
}

.not-found-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

/* ============ UNIT: HOURS + MAP ============ */
.unit .hours {
  margin-top: 6px;
}

.unit-map {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 9px 18px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(232, 200, 118, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.unit-map svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.unit-map-arrow {
  transition: transform 0.25s ease;
}

.unit-map:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(232, 200, 118, 0.12);
}

.unit-map:hover .unit-map-arrow {
  transform: translateX(3px);
}

/* ============ PRIVACY POLICY (MODAL) ============ */
.privacy-controller {
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid var(--hair);
  border-radius: 2px;
  background: var(--bg-deep);
}

.privacy-controller h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.privacy-controller p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.privacy-rights {
  margin-top: 28px;
}

.privacy-rights h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--ink);
}

.privacy-rights p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

.privacy-rights ul {
  margin: 12px 0 12px 18px;
  padding: 0;
}

.privacy-rights li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--muted);
}

.privacy-updated {
  margin-top: 24px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ============ FOOTER: PRIVACY LINK ============ */
.footer-legal {
  margin-top: 12px;
}

.footer-legal a {
  font-size: 0.74rem;
  color: var(--gold-soft);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

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

/* ============ SCROLLBARS ============ */
/* Themed scrollbars that match the dark + gold palette, applied site-wide
   (page, privacy modal, textarea).

   Chromium ignores ::-webkit-scrollbar when the standard scrollbar-width /
   scrollbar-color properties are present, so the rich styling below is kept
   for WebKit/Chromium, and the standard properties are scoped to engines
   that lack ::-webkit-scrollbar (Firefox) via @supports. */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(205, 184, 143, 0.5);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(232, 200, 118, 0.85);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(205, 184, 143, 0.55) transparent;
  }
}
