/* Berhe Law Firm - Base Styles */
/* Nav, Footer, Menu, Variables, Global Styles */

/* ==============================================
       RESET & VARIABLES
    ============================================== */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
      --ivory: #fafaf9;
      --dark: #0f0e0d;
      --dark-900: #1f1d1a;
      --dark-800: #33312c;
      --muted: #8f8b85;
      --muted-light: #adaba5;
      --border-light: #e5e5e3;
      --border-dark: rgba(255,255,255,0.08);
      --teal: #00b4c8;
      --teal-dim: rgba(0,180,200,0.15);
      --white: #ffffff;
      --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
      --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    }

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

body {
      background: var(--ivory);
      color: var(--dark);
      font-family: var(--sans);
      line-height: 1.6;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      animation: pageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

img { max-width: 100%; display: block; }

/* ==============================================
       NAVBAR
    ============================================== */
    .nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 998;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.5rem 3rem;
      background: rgba(15,14,13,0.92);
      backdrop-filter: blur(12px);
      transition: padding 0.3s ease;
    }

.nav.scrolled { padding: 1rem 3rem; }

.nav-logo {
      display: flex;
      align-items: center;
      color: var(--white);
      text-decoration: none;
    }
    .nav-logo svg {
      height: 1.5rem;
      width: auto;
    }

.nav-right {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }

.nav-phone {
      font-size: 0.8rem;
      color: rgba(255,255,255,0.5);
      letter-spacing: 0.06em;
      font-weight: 400;
    }

.nav-menu-btn {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      color: var(--white);
      font-size: 0.72rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      font-weight: 500;
      padding: 0.5rem 0;
    }

.nav-hamburger {
      display: flex;
      flex-direction: column;
      gap: 5px;
      width: 24px;
    }

.nav-hamburger span {
      display: block;
      height: 1.5px;
      background: var(--white);
      transition: all 0.3s ease;
      width: 100%;
    }

.nav-hamburger span:nth-child(2) { width: 70%; }

/* ==============================================
       MENU OVERLAY
    ============================================== */
    .menu-overlay {
      position: fixed;
      inset: 0;
      z-index: 999;
      background: var(--ivory);
      display: flex;
      flex-direction: column;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease;
    }

.menu-overlay.active {
      opacity: 1;
      pointer-events: all;
    }

.menu-overlay-header {
      position: absolute;
      top: 0; left: 0; right: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.5rem 3rem;
    }

.menu-overlay-logo {
      display: flex;
      align-items: center;
      color: var(--dark);
      text-decoration: none;
    }
    .menu-overlay-logo svg {
      height: 1.5rem;
      width: auto;
    }

.menu-close-btn {
      font-size: 0.72rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      font-weight: 500;
      color: var(--dark);
      display: flex;
      align-items: center;
      gap: 0.6rem;
      cursor: pointer;
    }

.menu-close-x {
      font-size: 1.5rem;
      font-weight: 300;
      line-height: 1;
    }

.menu-nav {
      list-style: none;
      text-align: right;
      padding-right: 3rem;
    }

.menu-nav li { margin-bottom: 0.5rem; }

.menu-nav a {
      font-family: var(--serif);
      font-size: clamp(2.5rem, 5vw, 4.5rem);
      font-weight: 400;
      color: var(--teal);
      line-height: 1.3;
      transition: opacity 0.2s ease;
      display: inline-block;
    }

.menu-nav a:hover { opacity: 0.6; }

.menu-nav a.active-page { color: var(--dark); }

.menu-footer {
      position: absolute;
      bottom: 2rem;
      left: 3rem;
      right: 3rem;
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
    }

.menu-footer-contact {
      font-size: 0.8rem;
      color: var(--muted);
      line-height: 1.8;
    }

/* ==============================================
       ARTICLE BODY
    ============================================== */
    .article-wrap {
      background: var(--ivory);
      padding: 4rem 3rem 5rem;
    }

.article-body { font-family: var(--sans); }

.article-body > p:first-child {
      display: none; /* Hide the "By [Author]..." lead paragraph that's already in the header */
    }

.article-body hr:first-of-type {
      display: none; /* Hide the opening HR */
    }

.article-body p {
      font-size: 1.05rem;
      line-height: 1.85;
      color: var(--dark-800);
      font-weight: 300;
      margin-bottom: 1.65rem;
    }

.article-body p strong { font-weight: 600; color: var(--dark); }

.article-body h2 {
      font-family: var(--serif);
      font-size: 1.55rem;
      font-weight: 500;
      color: var(--dark);
      margin: 3rem 0 1.1rem;
      line-height: 1.25;
    }

.article-body h3 {
      font-family: var(--serif);
      font-size: 1.18rem;
      font-weight: 500;
      color: var(--dark);
      margin: 2.25rem 0 0.85rem;
    }

.article-body h4 {
      font-family: var(--sans);
      font-size: 0.85rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      margin: 2rem 0 0.6rem;
    }

.article-body ul, .article-body ol {
      padding-left: 1.65rem;
      margin-bottom: 1.65rem;
    }

.article-body li {
      font-size: 1rem;
      line-height: 1.8;
      color: var(--dark-800);
      font-weight: 300;
      margin-bottom: 0.5rem;
    }

.article-body li strong { font-weight: 600; color: var(--dark); }

.article-body em { font-style: italic; }

.article-body hr {
      border: none;
      border-top: 1px solid var(--border-light);
      margin: 2.5rem 0;
    }

.article-body blockquote {
      border-left: 3px solid var(--teal);
      padding: 0.5rem 0 0.5rem 1.5rem;
      margin: 2.25rem 0;
      font-family: var(--serif);
      font-size: 1.12rem;
      font-style: italic;
      color: var(--dark-800);
    }

/* ==============================================
       ARTICLE NAVIGATION
    ============================================== */
    .article-nav {
      background: var(--ivory);
      border-top: 1px solid var(--border-light);
      padding: 3rem;
    }

.article-nav-inner {
      max-width: 720px;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      gap: 2rem;
    }

.article-nav-link {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      max-width: 46%;
      text-decoration: none;
    }

.article-nav-link.article-nav-next {
      text-align: right;
      margin-left: auto;
    }

.article-nav-link.article-nav-disabled {
      pointer-events: none;
    }

.article-nav-dir {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.68rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--muted);
      transition: color 0.2s ease;
    }

.article-nav-next .article-nav-dir {
      justify-content: flex-end;
    }

.article-nav-link:hover .article-nav-dir { color: var(--teal); }

.article-nav-title {
      font-family: var(--serif);
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--dark);
      line-height: 1.4;
      transition: color 0.2s ease;
    }

.article-nav-link:hover .article-nav-title { color: var(--teal); }

/* ==============================================
       FOOTER
    ============================================== */
    .footer {
      background: var(--dark-900);
      padding: 4rem 3rem 2rem;
      border-top: 1px solid rgba(255,255,255,0.06);
    }

.container { max-width: 1200px; margin: 0 auto; }

.footer-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 3rem;
      margin-bottom: 3rem;
    }

.footer-col-label {
      font-size: 0.68rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--white);
      margin-bottom: 1.25rem;
    }

.footer-col-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

.footer-col-links a {
      font-size: 0.82rem;
      color: rgba(255,255,255,0.4);
      font-weight: 300;
      transition: color 0.2s ease;
    }

.footer-col-links a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
      padding-top: 2rem;
      border-top: 1px solid rgba(255,255,255,0.06);
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 2rem;
      flex-wrap: wrap;
    }

.footer-copyright {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.25);
      font-weight: 300;
    }

.footer-offices-line {
      font-size: 0.72rem;
      color: rgba(255,255,255,0.2);
    }

.footer-disclaimer {
      font-size: 0.68rem;
      color: rgba(255,255,255,0.18);
      line-height: 1.65;
      margin-top: 0.75rem;
      max-width: 560px;
    }

.footer-badges {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

.footer-badges span {
      font-size: 0.65rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      font-weight: 500;
      color: rgba(255,255,255,0.25);
      border: 1px solid rgba(255,255,255,0.1);
      padding: 0.3rem 0.75rem;
      border-radius: 2px;
    }

.footer-social {
      display: flex;
      gap: 0.75rem;
    }

.footer-social a {
      width: 36px;
      height: 36px;
      border: 1px solid rgba(255,255,255,0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 600;
      color: rgba(255,255,255,0.3);
      border-radius: 2px;
      transition: all 0.2s ease;
    }

.footer-social a:hover {
      border-color: var(--teal);
      color: var(--teal);
    }

/* ==============================================
       BACK TO TOP
    ============================================== */
    .back-to-top {
      position: fixed;
      bottom: 2rem;
      left: 2rem;
      z-index: 998;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(15,14,13,0.8);
      backdrop-filter: blur(8px);
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transform: translateY(10px);
      transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      cursor: pointer;
      border: 1px solid rgba(255,255,255,0.08);
    }

.back-to-top.visible { opacity: 1; transform: translateY(0); }

.back-to-top:hover { background: var(--teal); border-color: var(--teal); }

.back-to-top svg { width: 18px; height: 18px; }

/* ==============================================
       RESPONSIVE
    ============================================== */
    @media (max-width: 768px) {
      .nav { padding: 1.25rem 1.5rem; }
      .nav.scrolled { padding: 0.875rem 1.5rem; }
      .nav-phone { display: none; }
      .menu-overlay-header { padding: 1.25rem 1.5rem; }
      .menu-nav { padding-right: 1.5rem; }
      .menu-footer { left: 1.5rem; right: 1.5rem; }
      .article-header { padding: 7rem 1.5rem 3rem; }
      .article-wrap { padding: 3rem 1.5rem 4rem; }
      .article-nav { padding: 2rem 1.5rem; }
      .article-cta { padding: 2.5rem 1.5rem; }
      .footer { padding: 3rem 1.5rem 2rem; }
      .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
      .footer-bottom { flex-direction: column; align-items: flex-start; }
      .harlan-fab { width: 52px; height: 52px; bottom: 1.25rem; right: 1.25rem; }
      .harlan-fab svg { width: 22px; height: 22px; }
      .harlan-fab-label { display: none; }
      .back-to-top { bottom: 1.25rem; left: 1.25rem; }
    }

@media (max-width: 480px) {
      .article-header-title { font-size: 1.75rem; }
      .article-nav-inner { flex-direction: column; gap: 1.5rem; }
      .article-nav-link { max-width: 100%; }
      .article-nav-link.article-nav-next { text-align: left; margin-left: 0; }
      .article-nav-next .article-nav-dir { justify-content: flex-start; }
      .footer-grid { grid-template-columns: 1fr; }
    }

.tm { font-size: 0.4em; vertical-align: super; font-style: normal; font-weight: 400; letter-spacing: 0; }

/* ===== MOBILE TOUCH TARGET & TYPOGRAPHY FIXES ===== */
    @media (max-width: 768px) {
      /* Minimum touch target sizes */
      .nav-toggle, .menu-close-btn, .chat-bubble {
        min-height: 44px !important;
        min-width: 44px !important;
      }
      
      /* Footer link touch targets */
      .footer-links a, .footer-col-links a, .footer-links li a {
        display: inline-block;
        padding: 6px 0;
        min-height: 44px;
        line-height: 32px;
        font-size: 14px !important;
      }
      
      /* Footer social links */
      .footer-social a {
        min-width: 44px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
      }
      
      /* Menu footer social */
      .menu-footer-social a {
        padding: 10px 16px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        font-size: 14px !important;
      }
      
      /* Minimum body font size on mobile */
      body, p, li, td, span, a {
        font-size: max(var(--font-size, inherit), 14px);
      }
      
      /* Specific small text fixes */
      .footer-disclaimer, .footer-copyright, .footer-offices-line {
        font-size: 12px !important; /* Legal text exception - can be smaller */
      }
      
      .footer-col-title, .footer-col-label {
        font-size: 14px !important;
      }
      
      /* Nav toggle */
      .nav-toggle {
        padding: 10px 14px !important;
        font-size: 13px !important;
      }
      
      /* Phone number in header */
      .nav-phone, header a[href^="tel"] {
        font-size: 14px !important;
        padding: 10px 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
      }
      
      /* Badge pills */
      .footer-badges a, .footer-badges span {
        font-size: 11px !important;
        padding: 8px 12px !important;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
      }
      
      /* Insight cards text */
      .insight-tag {
        font-size: 11px !important;
      }
      
      .insight-link, .insight-card a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        font-size: 14px !important;
      }
    }

/* Berhe & Jones wordmark logo (added 2026-05-06) */
.nav-logo-mark {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.nav-logo-berhe {
  color: #ffffff;
}
.nav-logo-jones {
  color: #ffffff;
}
.nav-logo-amp {
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--teal, #00b4c8);
  margin: 0 0.45em;
  font-size: 1.05em;
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0;
}
.menu-overlay-logo .nav-logo-mark {
  font-size: 1.5rem;
}
@media (max-width: 768px) {
  .nav-logo-mark { font-size: 1.15rem; }
}

/* Hide header phone on small mobile so it doesn't collide with the wordmark */
@media (max-width: 560px) {
  .nav-phone { display: none !important; }
}
