/* ============================================================
   MFB Property Consultant & Legal Advisors — core styles
   Design tokens live in :root — change values here, nowhere else.
   ============================================================ */
:root {
  --ink: #0B1526;
  --ink-2: #16253D;
  --ink-glow: #1F3357;
  --paper: #FBF9F4;
  --surface: #F1EADC;
  --surface-2: #FFFFFF;
  --charcoal: #1E232B;
  --gold: #B4914F;
  --gold-light: #E2C888;
  --gold-dark: #8F7135;
  --slate: #5A6672;
  --border: rgba(11, 21, 38, 0.09);
  --border-light: rgba(251, 249, 244, 0.14);

  --shadow-sm: 0 2px 10px rgba(11, 21, 38, 0.06);
  --shadow-md: 0 16px 40px rgba(11, 21, 38, 0.10);
  --shadow-lg: 0 28px 64px rgba(11, 21, 38, 0.18);
  --shadow-gold: 0 10px 28px rgba(180, 145, 79, 0.28);

  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.28s var(--ease);
  --transition-fast: 0.16s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip-link a { background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--radius-sm); }
.skip-link a:focus { position: fixed; left: 12px; top: 12px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.75rem); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 2.9vw, 2.35rem); line-height: 1.2; font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 700; }
h4 { font-size: 0.95rem; color: var(--slate); font-family: var(--font-sans); font-weight: 700; }

.accent-word { color: var(--gold-dark); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .accent-word {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 45%, var(--gold-light) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}

p { margin: 0 0 1em; max-width: 62ch; }
a { color: inherit; }
ul { margin: 0; padding-left: 1.1em; }
li { margin-bottom: 0.45em; max-width: 55ch; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Scroll-reveal (progressive enhancement; content is visible without JS) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Top bar ---------- */
.topbar { background: linear-gradient(90deg, var(--ink) 0%, var(--ink-2) 100%); color: rgba(251,249,244,0.82); font-size: 0.85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar-contact a { color: var(--paper); text-decoration: none; transition: color var(--transition-fast); }
.topbar-contact a:hover { color: var(--gold-light); }
.topbar-sep { margin: 0 10px; opacity: 0.4; }
.topbar-wa { color: var(--gold-light); text-decoration: none; font-weight: 500; transition: color var(--transition-fast); }
.topbar-wa:hover { color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 249, 244, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.is-scrolled { background: rgba(251, 249, 244, 0.96); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 52px; width: auto; display: block; transition: transform var(--transition-fast); }
.brand:hover .brand-logo { transform: scale(1.03); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav > a, .nav-item > a {
  text-decoration: none; color: var(--charcoal); font-size: 0.94rem; font-weight: 500;
  position: relative; padding: 6px 0;
}
.main-nav a:not(.nav-cta):after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--gold); border-radius: var(--radius-pill); transition: width var(--transition);
}
.main-nav a:not(.nav-cta):hover:after,
.main-nav a:not(.nav-cta).active:after { width: 100%; }
.main-nav a.active:not(.nav-cta) { color: var(--gold-dark); }

.nav-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper) !important;
  padding: 0.65em 1.4em !important;
  border-radius: var(--radius-pill);
  font-weight: 700 !important;
  box-shadow: var(--shadow-sm) !important;
  transition: box-shadow var(--transition), transform var(--transition-fast);
}
.nav-cta::before {
  content: ''; position: absolute; top: 0; left: -75%; width: 45%; height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: skewX(-20deg); transition: left 0.65s var(--ease); pointer-events: none;
}
.nav-cta:hover::before { left: 130%; }
.nav-cta:hover, .nav-cta.active { box-shadow: var(--shadow-md); transform: translateY(-2px) scale(1.03); }

.nav-item { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  min-width: 270px; padding: 10px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transition: opacity var(--transition), transform var(--transition);
}
@media (min-width: 861px) {
  .nav-item:hover .dropdown, .nav-item:focus-within .dropdown {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
  }
}
.dropdown a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none;
  color: var(--charcoal); font-size: 0.9rem; font-weight: 500; border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.dropdown a:hover { background: var(--surface); }
.dropdown-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9em; padding: 0.15em 0.5em; border-radius: var(--radius-pill);
  color: #fff; background: var(--accent, var(--gold));
  font-family: var(--font-serif); font-weight: 700; font-size: 0.78rem;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; position: relative; z-index: 45; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; border-radius: var(--radius-pill); transition: transform var(--transition), opacity var(--transition); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-7) 0 var(--space-6);
  background: radial-gradient(ellipse 900px 550px at 12% -10%, rgb(180 145 79 / 66%) 0%, transparent 62%), radial-gradient(ellipse 750px 550px at 100% 5%, rgb(169 216 249 / 34%) 0%, #00000000 58%), radial-gradient(ellipse 600px 400px at 60% 100%, rgb(233 202 142 / 39%) 0%, #00000000 60%), linear-gradient(180deg, #ffdd99 0%, var(--paper) 75%);
}
.hero-skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 170px; opacity: 0.06; pointer-events: none; }
.hero-skyline svg { width: 100%; height: 100%; fill: var(--ink); }
.hero-inner { position: relative;}

/* ---------- Hero with cover photo ---------- */
.hero.hero-has-image {
  background-image:
    linear-gradient(180deg, rgba(11,21,38,0.72) 0%, rgba(11,21,38,0.88) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center 30%;
  padding-top: calc(var(--space-7) + var(--space-4));
  padding-bottom: calc(var(--space-6) + var(--space-4));
}
.hero-has-image .eyebrow { color: var(--gold-light); border-left-color: var(--gold-light); }
.hero-has-image h1 { color: var(--paper); }
.hero-has-image .accent-word { color: var(--gold-light) !important; -webkit-text-fill-color: var(--gold-light) !important; }
.hero-has-image .hero-lede { color: rgba(251,249,244,0.82); }
.hero-has-image .stat-row { border-top-color: rgba(251,249,244,0.2); }
.hero-has-image .stat dd { color: rgba(251,249,244,0.68); }
.hero-has-image .btn-ghost { border-color: rgba(251,249,244,0.5); color: var(--paper); }
.hero-has-image .btn-ghost:hover { background: rgba(251,249,244,0.12); border-color: var(--paper); color: var(--paper); }
.eyebrow {
  font-family: var(--font-sans); color: var(--gold-dark); font-size: 0.85rem; font-weight: 700;
  margin-bottom: 1.1em; letter-spacing: 0.06em; text-transform: uppercase;
  display: inline-block; padding-left: 14px; border-left: 3px solid var(--gold);
}
.hero-lede { font-size: 1.1rem; color: var(--slate); max-width: 58ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 1.9em; flex-wrap: wrap; }

.stat-row { display: flex; gap: 0; margin: var(--space-6) 0 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.stat { position: relative; margin: 0; padding-right: var(--space-5); }
.stat:not(:last-child)::after {
  content: ''; position: absolute; top: 6px; right: calc(var(--space-5) / 2);
  width: 1px; height: calc(100% - 4px); background: var(--border);
}
.stat dt {
  font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; line-height: 1;
  color: var(--gold-dark);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .stat dt {
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 55%, var(--gold-light) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
  }
}
.stat dd {
  margin: 0.5em 0 0; font-size: 0.76rem; color: var(--slate); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- Credentials list (courts/bodies) ---------- */
.credentials-section { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.credentials-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 40px;
}
.credentials-grid li {
  display: flex; align-items: center; gap: 14px;
  font-size: 1rem; font-weight: 600; color: var(--ink);
  margin: 0; max-width: none; padding: 16px 0; border-bottom: 1px solid var(--border);
}
.credentials-grid svg {
  width: 20px; height: 20px; color: var(--gold-dark); flex-shrink: 0;
  padding: 3px; box-sizing: content-box; border: 1.5px solid var(--gold); border-radius: 50%;
}
@media (max-width: 640px) {
  .credentials-grid { grid-template-columns: 1fr; }
}

/* ---------- Sections (shared) ---------- */
.section { padding: var(--space-7) 0; border-bottom: 1px solid var(--border); }
.section-alt {
  background:
    radial-gradient(ellipse 700px 400px at 0% 0%, rgba(180,145,79,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 700px 400px at 100% 100%, rgba(47,110,82,0.08) 0%, transparent 55%),
    var(--surface);
}
.section-eyebrow {
  font-family: var(--font-sans); color: var(--gold-dark); font-size: 0.85rem; font-weight: 700;
  margin-bottom: 0.8em; letter-spacing: 0.06em; text-transform: uppercase;
  display: inline-block; padding-left: 14px; border-left: 3px solid var(--gold);
}
.section-header { max-width: 640px; margin-bottom: var(--space-4); }

.two-col { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.col-label { position: sticky; top: 112px; }
.detail-lede { color: var(--slate); }

/* ---------- Final CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; color: var(--paper); padding: var(--space-6) 0; text-align: center;
  background:
    radial-gradient(ellipse 800px 450px at 15% 0%, rgba(180,145,79,0.30) 0%, transparent 62%),
    radial-gradient(ellipse 700px 450px at 100% 100%, rgba(47,110,82,0.22) 0%, transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(251,249,244,0.72); margin: 0 auto 1.5em; max-width: 52ch; }
.cta-band-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { padding: var(--space-6) 0 var(--space-3); background: var(--ink); color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: var(--space-4); border-bottom: 1px solid var(--border-light); }
.footer-col h4 { color: rgba(251,249,244,0.5); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.07em; font-family: var(--font-sans); margin-bottom: 1.1em; }
.footer-firm p { color: rgba(251,249,244,0.68); font-size: 0.9rem; }
.footer-logo { height: 44px; width: auto; display: block; margin-bottom: 0.8em; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.7em; max-width: none; }
.footer-links a { color: rgba(251,249,244,0.82); text-decoration: none; font-size: 0.9rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--gold-light); }
.footer-muted { font-size: 0.85rem; }
.footer-legal { padding-top: var(--space-3); }
.footer-disclaimer { font-size: 0.78rem; color: rgba(251,249,244,0.5); max-width: none; }
.footer-bottom-row p { margin: 0; font-size: 0.8rem; color: rgba(251,249,244,0.5); }

/* ---------- Floating WhatsApp button ---------- */
.fab-wa {
  position: fixed; right: 24px; bottom: 24px; width: 58px; height: 58px;
  background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); z-index: 60; transition: transform var(--transition-fast);
}
.fab-wa:hover { transform: scale(1.08); }
.fab-wa svg { width: 28px; height: 28px; fill: #fff; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .col-label { position: static; }
  .stat { padding-right: var(--space-4); }
  .stat:not(:last-child)::after { right: calc(var(--space-4) / 2); }
  .topbar-contact span:not(.topbar-sep) { display: none; }

  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand-logo { height: 40px; }
}

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

.hero-actions .btn-primary
 {
    border: 1px solid #959595;
}

@media(max-width: 767px){
    :root{
        --space-7: 50px;
    }
    hero-has-image h1 br {
        display: none;
    }
}
/* ---------- Mobile navigation panel ----------
   Deliberately has zero shared class names with the desktop .main-nav / .dropdown
   system above, so a desktop-only rule can never affect this again. Uses a FIXED,
   full-height overlay positioned below the header (not covering it), so the
   hamburger button stays visible/clickable to close it — this must be `fixed`,
   not `relative`, or the panel just pushes page content down instead of
   overlaying it. Opacity/transform/visibility are animated together (not
   `display`, which cannot be transitioned) for the open/close animation. */
.mobile-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--transition), transform var(--transition), visibility 0s linear var(--transition);
}
.mobile-nav-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity var(--transition), transform var(--transition), visibility 0s linear 0s;
  position: relative;
}
body.mobile-nav-locked { overflow: hidden; }

.mobile-nav-view { display: flex; flex-direction: column; padding: 8px 24px 40px; }
.mobile-nav-view[hidden] { display: none; }

.mobile-nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 18px 4px; border-bottom: 1px solid var(--border);
  font-size: 1.05rem; font-weight: 600; color: var(--charcoal); text-decoration: none;
  background: none; border-left: none; border-right: none; border-top: none;
  text-align: left; font-family: var(--font-sans); box-sizing: border-box; cursor: pointer;
}
.mobile-nav-link.is-active { color: var(--gold-dark); }
.mobile-nav-chevron { width: 18px; height: 18px; color: var(--slate); flex-shrink: 0; }

.mobile-nav-cta {
  display: block; text-align: center; margin-top: 24px; padding: 1em 1.6em;
  border-radius: var(--radius-pill); background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--paper) !important; font-weight: 700; text-decoration: none;
}

.mobile-nav-back {
  display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer;
  padding: 14px 4px; margin-bottom: 4px; font-family: var(--font-sans); font-size: 0.95rem;
  font-weight: 600; color: var(--slate);
}
.mobile-nav-back svg { width: 18px; height: 18px; flex-shrink: 0; }

.mobile-nav-overview-link { font-weight: 700; color: var(--ink); }

.mobile-nav-sublink { justify-content: flex-start; }
.mobile-nav-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 2em; padding: 0.25em 0.6em; margin-right: 14px; border-radius: var(--radius-pill);
  color: #fff; background: var(--accent, var(--gold)); font-family: var(--font-serif);
  font-weight: 700; font-size: 0.78rem;
}

@media (min-width: 861px) {
  .mobile-nav-panel, .mobile-nav-panel.is-open {
    display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
  }
}