/* Local Fractional — Custom Styles */

/* Registered trademark badge for the brand logo */
.lf-mark {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.lf-mark::after {
  content: '\00AE';
  position: absolute;
  top: 2px;
  right: -10px;
  font-size: 0.65rem;
  line-height: 1;
  color: #BD9542;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  pointer-events: none;
}
@media (max-width: 640px) {
  .lf-mark::after { font-size: 0.55rem; right: -8px; top: 1px; }
}

/* Brand color utilities */
.bg-navy { background-color: #1a2332; }
.text-navy { color: #1a2332; }
.bg-brand-blue { background-color: #2b6cb0; }
.text-brand-blue { color: #2b6cb0; }
.bg-brand-green { background-color: #38a169; }
.text-brand-green { color: #38a169; }
.text-body { color: #1a202c; }
.text-secondary { color: #4a5568; }
.bg-light { background-color: #f7fafc; }
.border-brand-blue { border-color: #2b6cb0; }

/* Typography */
.font-heading { font-family: 'DM Sans', sans-serif; }
.font-body { font-family: 'Inter', sans-serif; }

/* Video hero */
.hero-video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #ffffff;
}

.hero-video-sticky {
  position: relative;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-video-sticky video,
.hero-video-sticky img.hero-poster {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  background: rgba(26, 35, 50, 0.55);
}

/* Sticky nav */
#main-nav {
  transition: box-shadow 0.2s ease;
  border-bottom: 1px solid #e2e8f0;
}

.nav-scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  min-width: 240px;
  z-index: 50;
  padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: #1a202c;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu a:hover {
  background-color: #f7fafc;
  color: #2b6cb0;
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: white;
  z-index: 100;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 1.5rem;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  display: none;
}

.mobile-nav-overlay.open {
  display: block;
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Inline mobile menu (used on tools, ai-services, compare/*, team/*).
   Hidden by default on narrow viewports; opened via #mobile-menu-btn. */
@media (max-width: 1023px) {
  .mobile-menu {
    display: none;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
  }
  .mobile-menu.open {
    display: block;
  }
}

/* Service tier cards */
.tier-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 2rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tier-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #2b6cb0;
}

.tier-card.featured {
  border-color: #2b6cb0;
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(43, 108, 176, 0.12);
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
}

.faq-question {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 0;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: #1a202c;
}

.faq-question:hover {
  color: #2b6cb0;
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem 0;
}

.faq-answer.open {
  display: block;
}

.faq-arrow {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-arrow.open {
  transform: rotate(180deg);
}

/* ---- Mobile sticky CTA bar ---- */
.lf-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lf-mobile-cta .lf-cta-book {
  flex: 1;
  display: block;
  text-align: center;
  background: #38a169;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}

.lf-mobile-cta .lf-cta-book:hover {
  background: #2f855a;
}

.lf-mobile-cta .lf-cta-call {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: #1a2332;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.lf-mobile-cta .lf-cta-call:hover {
  opacity: 0.85;
}

.lf-mobile-cta .lf-cta-call svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Hide on desktop (1024px+) */
@media (min-width: 1024px) {
  .lf-mobile-cta { display: none; }
}

/* Give body bottom padding on mobile so footer content isn't hidden behind the bar */
@media (max-width: 1023px) {
  body { padding-bottom: 4.5rem; }
}

/* ---- Team headshot crops: center on eyes, not torso ---- */
/* Source portraits (Chris, Taber) are 600x803 with face in the top
   half; default object-position: center would crop to chest area and
   clip the top of the head. Shift the crop focus up to ~20% from top. */
img[src*="/assets/images/team/"].object-cover {
  object-position: center 20%;
}

/* ---- Blog tag cloud chips ---- */
.lf-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4a5568;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.2;
}

.lf-tag-chip:hover {
  background: rgba(43, 108, 176, 0.08);
  color: #2b6cb0;
  border-color: #2b6cb0;
}

.lf-tag-chip.active {
  background: #2b6cb0;
  color: #fff;
  border-color: #2b6cb0;
}

.lf-tag-chip .lf-tag-count {
  font-size: 0.6875rem;
  font-weight: 400;
  opacity: 0.7;
  padding: 0.0625rem 0.375rem;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
}

.lf-tag-chip.active .lf-tag-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  opacity: 1;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #2b6cb0;
  outline-offset: 2px;
}

/* Authority citation blockquotes (GEO signals) */
.authority-citation {
  border-left: 4px solid #2b6cb0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: #f7fafc;
  border-radius: 0 0.5rem 0.5rem 0;
}

.authority-citation p {
  color: #1a202c;
  font-style: italic;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.authority-citation cite {
  display: block;
  font-style: normal;
  font-size: 0.875rem;
  color: #4a5568;
}

.authority-citation cite a {
  color: #2b6cb0;
  text-decoration: none;
}

.authority-citation cite a:hover {
  text-decoration: underline;
}

/* ============================================================
   MOBILE-ONLY OVERRIDES (≤767px)
   Desktop layout intentionally unchanged.
   ============================================================ */
@media (max-width: 767px) {
  /* Anchor-link landings clear the fixed nav (h-20 = 5rem) */
  html { scroll-padding-top: 5rem; }

  /* Defensive: stop accidental horizontal scroll from any wide child */
  body { overflow-x: hidden; }

  /* Shorter hero so the next section peeks above the fold */
  .hero-video-container,
  .hero-video-sticky { height: 72vh; }

  /* Tighter padding so H1 + subhead + CTAs fit comfortably in 72vh */
  .hero-overlay { padding: 1.25rem; }

  /* Tighten section padding to shorten total page length on mobile.
     Targets every <section class="py-20 …"> inside <main>. */
  main > section.py-20 { padding-top: 2.75rem; padding-bottom: 2.75rem; }
  /* Pull section heading blocks closer to their content */
  main section .mb-16 { margin-bottom: 2.25rem; }
  main section .mb-12 { margin-bottom: 2rem; }

  /* Slightly larger drawer tap targets */
  .mobile-nav .mobile-dropdown-toggle,
  .mobile-nav a { min-height: 44px; }

  /* Drawer respects iOS notch / home indicator */
  .mobile-nav {
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

}

/* ============================================================
   WCAG AA CONTRAST + LINK DISTINGUISHABILITY (all viewports)
   Promoted from mobile-only on 2026-04-23 per Chris's go-ahead.
   ------------------------------------------------------------
   1. Brand gold #BD9542 only hits 2.5-2.8:1 on light backgrounds.
      Use #846628 — gold-700, already in the brand palette as the
      hover/press state, so this is a brand-approved shade rather
      than a new color.
   2. text-gray-400 (#9ca3af) is too light on ivory; bump to gray-600.
   3. Footer / dark-navy bg needs a *lighter* gold (#d4b169) so contrast
      works in the other direction; body paragraphs go to gray-300.
   4. Gold-on-light-gold badges — switch text to navy for legibility.
   5. In-text links inside <p> and <li> always carry an underline so
      they're distinguishable without relying on color alone (axe
      link-in-text-block rule).
   ============================================================ */
.text-brand-blue,
.text-brand-green { color: #846628 !important; }
.text-gray-400 { color: #4b5563 !important; }
.bg-navy p,
footer p,
.bg-navy .text-gray-400,
.bg-navy .text-gray-500,
.bg-navy .text-secondary,
footer .text-gray-400,
footer .text-gray-500,
footer .text-secondary { color: #d1d5db !important; }
.bg-navy .text-brand-blue,
.bg-navy .text-brand-green,
footer .text-brand-blue,
footer .text-brand-green { color: #d4b169 !important; }
.bg-brand-blue\/10.text-brand-blue,
.bg-brand-green\/10.text-brand-green { color: #0e1b2e !important; }
p a, li a { text-decoration: underline; text-underline-offset: 2px; }
