/* ═══════════════════════════════════════════
   EA MAPPING V1 — Light Theme
   Brand palette:
     Blue    #2A6496
     Gray    #7A7A7A
     Orange  #D4681A
     BG      #ffffff / #f9fafb
══════════════════════════════════════════ */

/* ── Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── CSS Tokens ─────────────────────────── */
:root {
  --blue:         #2A6496;
  --blue-h:       #1e4f78;
  --blue-light:   rgba(42, 100, 150, 0.08);
  --blue-mid:     rgba(42, 100, 150, 0.15);
  --gray:         #7A7A7A;
  --orange:       #D4681A;
  --orange-h:     #b85615;
  /* Hero-specific accent — slightly more muted/premium burnt orange */
  --hero-accent:  #C4631A;
  --hero-accent-h:#a85416;
}

/* ── Logo sizing ─────────────────────────── */
.nav-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.footer-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  /* logo-light.png on dark footer — remove white bg */
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* ── Navigation ──────────────────────────── */
#navbar {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(255,255,255,0.30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 24px rgba(0,0,0,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
  transition: color 200ms ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--blue);
  border-radius: 1px;
  transition: width 220ms cubic-bezier(0.4,0,0.2,1);
}
.nav-link:hover::after { width: 100%; }

/* ── Services Dropdown ───────────────────── */
.nav-dropdown-wrap {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 400;
  color: #4b5563;
  letter-spacing: 0.025em;
  padding: 0;
  font-family: inherit;
  transition: color 200ms ease;
}
.nav-dropdown-trigger:hover { color: var(--blue); }
.nav-dropdown-chevron {
  width: 14px; height: 14px;
  transition: transform 220ms ease;
  color: #9ca3af;
}
.nav-dropdown-wrap:hover .nav-dropdown-chevron,
.nav-dropdown-wrap.open .nav-dropdown-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}
.nav-dropdown-trigger:hover .nav-dropdown-chevron { color: var(--blue); }

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: 480px;
  padding: 24px 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  pointer-events: none;
  z-index: 100;
}
.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 6px;
  background: #ffffff;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.nav-dropdown-wrap:hover .nav-dropdown-panel,
.nav-dropdown-wrap.open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown-col {
  padding: 4px 16px;
}
.nav-dropdown-col + .nav-dropdown-col {
  border-left: 1px solid #f3f4f6;
}
.nav-dropdown-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
  padding-left: 4px;
}
.nav-dropdown-item {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 150ms ease;
  margin-bottom: 2px;
}
.nav-dropdown-item:hover { background: var(--blue-light); }
.nav-dropdown-item-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
}
.nav-dropdown-item-desc {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 300;
  margin-top: 1px;
  line-height: 1.3;
}

/* ── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--blue);
  transition: background 250ms ease, box-shadow 250ms ease, transform 250ms ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--blue-h);
  border-color: var(--blue-h);
  box-shadow: 0 4px 18px rgba(42,100,150,0.30);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--blue);
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--blue);
  transition: background 250ms ease, color 250ms ease, transform 250ms ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-secondary:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

/* CTA section white button */
.btn-cta-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  padding: 0.875rem 2.5rem;
  border-radius: 9999px;
  border: 2px solid #fff;
  transition: background 250ms ease, box-shadow 250ms ease, transform 250ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-cta-white:hover {
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

/* ── Hero ────────────────────────────────── */

.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Real <img> — GPU-composited, no scaling blur */
@keyframes heroZoom {
  from { transform: translateZ(0) scale(1.0); }
  to   { transform: translateZ(0) scale(1.03); }
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  image-rendering: auto;
  transform: translateZ(0) scale(1.0);
  backface-visibility: hidden;
  animation: heroZoom 32s ease-out forwards;
  transform-origin: 60% center;
  will-change: transform;
}

/* Premium overlay — dark left for legibility, photo breathes on right */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    105deg,
    rgba(5,20,40,0.52) 0%,
    rgba(5,20,40,0.36) 38%,
    rgba(5,20,40,0.12) 65%,
    rgba(5,20,40,0.04) 100%
  );
  pointer-events: none;
}

/* Fine dot-grid (left-heavy, fades right) */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to right, black 0%, black 40%, transparent 75%);
  pointer-events: none;
}

/* Hero content — sits above all layers */
.hero-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 72px 2rem 3rem;
}
@media (min-width: 768px)  { .hero-content { padding: 72px 3.5rem 4rem; } }
@media (min-width: 1024px) { .hero-content { padding: 72px 5rem 4.5rem; } }

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
  pointer-events: none;
}
@media (min-width: 768px)  { .hero-scroll-cue { left: 3.5rem; } }
@media (min-width: 1024px) { .hero-scroll-cue { left: 5rem; } }

/* Headline */
.hero-headline {
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 20px rgba(0,0,0,0.30),
    0 0  60px rgba(180,190,210,0.12),
    0 0 120px rgba(160,170,200,0.07);
}

/* Subtitle */
.hero-subtitle {
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}

/* Trust pills — refined glassmorphism */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}

/* Hero CTA — premium burnt orange */
.btn-hero-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: var(--hero-accent);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.875rem;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.09em;
  font-size: 0.8125rem;
  transition:
    background  280ms cubic-bezier(0.4,0,0.2,1),
    box-shadow  280ms cubic-bezier(0.4,0,0.2,1),
    transform   280ms cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 12px rgba(196,99,26,0.30), 0 1px 3px rgba(0,0,0,0.15);
}
.btn-hero-orange:hover {
  background: var(--hero-accent-h);
  box-shadow: 0 6px 24px rgba(196,99,26,0.40), 0 2px 6px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.btn-hero-orange:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(196,99,26,0.25);
}

/* ── Hero entrance animations ───────────── */
.hero-element {
  transition:
    opacity  700ms cubic-bezier(0.4,0,0.2,1),
    transform 700ms cubic-bezier(0.4,0,0.2,1);
}
.hero-element.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── Scroll indicator ────────────────────── */
.scroll-indicator {
  animation: scrollPulse 2.8s ease-in-out infinite;
  opacity: 0;
  animation-delay: 1.8s;
  animation-fill-mode: forwards;
}
@keyframes scrollPulse {
  0%   { opacity: 0;   transform: translateX(-50%) translateY(0); }
  30%  { opacity: 0.7; }
  70%  { opacity: 0.2; }
  100% { opacity: 0;   transform: translateX(-50%) translateY(10px); }
}

/* ── Service Cards ───────────────────────── */
.service-card-img {
  margin: -1.75rem -1.75rem 0;
  height: 11rem;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
}
.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 350ms ease;
}
.service-card:hover .service-card-img img {
  transform: scale(1.04);
}

.service-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.75rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition:
    border-color 250ms ease,
    box-shadow   250ms ease,
    transform    250ms ease;
}
.service-card:hover {
  border-color: rgba(42,100,150,0.35);
  box-shadow: 0 8px 32px rgba(42,100,150,0.10), 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-3px);
}
.service-card:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--blue-light);
  color: var(--blue);
  transition: background 250ms ease;
}
.service-card:hover .service-icon-wrap {
  background: var(--blue-mid);
}

.service-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.01em;
  transition: color 250ms ease;
}
.service-card:hover .service-link {
  color: var(--blue-h);
}

/* ── Trust Pillars ───────────────────────── */
.trust-pillar {
  transition: transform 250ms ease;
}
.trust-pillar:hover { transform: translateY(-2px); }

.trust-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--blue-light);
  color: var(--blue);
  border: 1px solid rgba(42,100,150,0.15);
}

/* ── CTA section ─────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, #1e3f5a 0%, var(--blue) 50%, #1a567a 100%);
}

/* ── Mobile menu ─────────────────────────── */
#mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 72px);
  background: #ffffff;
  z-index: 9999;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,.1);
}
#mobile-menu a,
#mobile-menu p {
  display: block;
}
@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll-reveal for cards ────────────── */
/* Applied via JS */

/* ── Focus & selection ───────────────────── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: rgba(42,100,150,0.15);
  color: #1a1a1a;
}

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #e8f0f7; }
::-webkit-scrollbar-thumb { background: rgba(42,100,150,0.55); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2A6496; }

/* ── Stats Strip / Pipeline ──────────────── */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--blue);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-phrase {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--blue);
  text-align: center;
  letter-spacing: 0.01em;
}

.stat-label {
  font-size: 0.70rem;
  font-weight: 400;
  color: #6b7280;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.stat-arrow {
  flex-shrink: 0;
  color: #d1d5db;
  font-size: 1rem;
  padding: 0 0.25rem;
}
/* on mobile the row stacks — hide arrows */
@media (max-width: 767px) {
  .stat-arrow { display: none; }
  .stat-item { padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }
  .stat-item:last-child { border-bottom: none; }
}

/* ── Why Clients Choose Us ───────────────── */
.why-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 2rem;
  transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}
.why-card:hover {
  border-color: rgba(42,100,150,0.30);
  box-shadow: 0 8px 28px rgba(42,100,150,0.08);
  transform: translateY(-2px);
}
.why-card--cta {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-style: dashed;
}
.why-card--cta:hover { transform: none; }

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 1rem;
}

.why-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.why-body {
  font-size: 0.8125rem;
  font-weight: 300;
  color: #6b7280;
  line-height: 1.65;
}

/* ── County tags (Service Areas) ────────── */
.county-tag {
  font-size: 0.6875rem;
  font-weight: 400;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* ── Selected Projects (editorial cards) ─── */
.project-card-v2 {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  transition: transform 380ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 380ms cubic-bezier(0.22,1,0.36,1);
  display: flex;
  flex-direction: column;
}
.project-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(0,0,0,0.11), 0 4px 14px rgba(0,0,0,0.06);
}
.project-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
}
.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 600ms cubic-bezier(0.22,1,0.36,1);
}
.project-card-v2:hover .project-img-wrap img {
  transform: scale(1.05);
}
.project-img-overlay {
  display: none;
}
.project-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(5,8,18,0.72);
  padding: 4px 10px;
  border-radius: 3px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(212,104,26,0.25);
}
.project-card-body {
  padding: 1.375rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}
.project-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}
.project-desc {
  font-size: 0.8125rem;
  font-weight: 300;
  color: #6b7280;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding-top: 0.875rem;
  border-top: 1px solid #f3f4f6;
}
.project-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 3px 8px;
  border-radius: 3px;
}

/* ── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-element, .service-card, .scroll-indicator,
  .btn-primary, .btn-secondary, .btn-cta-white {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .hero-element { opacity: 1 !important; transform: none !important; }
}
