/* ============================================================
   GLOBAL.CSS — MNB Excavation
   Shared reset, variables, nav, footer, carousel, utilities
   ============================================================ */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--clr-text); background: #fff; line-height: 1.6; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
address { font-style: normal; }
input, select, textarea { font: inherit; }

/* === ROOT VARIABLES === */
:root {
  --clr-primary-dark:  #1A1209;
  --clr-primary-mid:   #3D2B1F;
  --clr-accent:        #E8600A;
  --clr-accent-warm:   #C8922A;
  --clr-surface-light: #F4EFE6;
  --clr-surface-mid:   #D9CEBC;
  --clr-text:          #1C1C1C;
  --clr-text-inv:      #FAF7F2;
  --clr-green:         #4A6741;
  --clr-overlay:       rgba(26, 18, 9, 0.78);
  --font-heading:      'Oswald', sans-serif;
  --font-body:         'Open Sans', sans-serif;
  --transition:        0.3s ease;
  --shadow-card:       0 4px 24px rgba(0,0,0,0.14);
  --shadow-hover:      0 8px 40px rgba(0,0,0,0.22);
  --radius:            6px;
  --radius-lg:         12px;
  --nav-h:             80px;
  --clr-navy:          #003087;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--clr-navy);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
strong, b { color: var(--clr-navy); }

/* === UTILITIES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 50px 0; }
.text-center { text-align: center; }
.text-accent { color: var(--clr-accent); }
.text-inv { color: var(--clr-text-inv); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-heading);
  color: var(--clr-navy);
  margin-bottom: 1rem;
}
.section-title.light { color: var(--clr-text-inv); }
.section-desc {
  max-width: 640px;
  color: #555;
  font-size: 1.05rem;
}
.section-desc.center { margin: 0 auto; text-align: center; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--transition);
}
.btn-primary {
  background: var(--clr-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(232,96,10,0.35);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: #c94e00;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,96,10,0.45);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  transform: translateY(-2px);
}
.btn-dark {
  background: var(--clr-primary-dark);
  color: #fff;
}
.btn-dark:hover { background: var(--clr-primary-mid); transform: translateY(-2px); }

/* === FOCUS VISIBLE === */
:focus-visible { outline: 2px solid var(--clr-accent); outline-offset: 3px; }

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--clr-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 10000;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* === SCROLL PROGRESS BAR === */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--clr-accent);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: var(--clr-navy);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.main-nav { height: 100%; }
.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--clr-accent);
  letter-spacing: 0.05em;
}
.logo-sub {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-top: 1px;
}

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-menu a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--clr-accent);
  transition: left var(--transition), right var(--transition);
}
.nav-menu a:hover, .nav-menu a.active { color: #fff; }
.nav-menu a:hover::after, .nav-menu a.active::after { left: 0.85rem; right: 0.85rem; }

/* CTA phone */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--clr-accent);
  color: #fff !important;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.nav-cta:hover { background: #c94e00; transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  border-radius: var(--radius);
  color: #fff;
}
.hamburger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
  transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: var(--clr-overlay);
}
.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel-dot.active {
  background: var(--clr-accent);
  border-color: var(--clr-accent);
  transform: scale(1.3);
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}
.carousel-btn:hover { background: rgba(232,96,10,0.7); }
.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

/* ============================================================
   PAGE HERO (shared, height varies per page via modifier)
   ============================================================ */
.page-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: var(--nav-h);
}
.page-hero--full  { height: calc(100vh - 0px); margin-top: 0; }
.page-hero--large { height: 60vh; min-height: 420px; }
.page-hero--mid   { height: 50vh; min-height: 360px; }
.page-hero--small { height: 40vh; min-height: 300px; }

.page-hero__content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  color: #fff;
}
.page-hero__breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.page-hero__breadcrumb a { color: rgba(255,255,255,0.7); transition: color var(--transition); }
.page-hero__breadcrumb a:hover { color: var(--clr-accent); }
.page-hero__breadcrumb span { color: rgba(255,255,255,0.4); }
.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.page-hero__sub {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceDown 2s infinite;
}
.scroll-indicator i { font-size: 1.1rem; }

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ============================================================
   CTA BANNER (shared)
   ============================================================ */
.cta-banner {
  background: var(--clr-navy);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, transparent 60%);
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.cta-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
  transition: transform var(--transition);
}
.cta-phone-link:hover { transform: scale(1.04); }
.cta-banner .btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  background: var(--clr-navy);
  padding: 20px 0;
}
.trust-bar__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 3rem;
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.trust-bar__item i {
  color: var(--clr-accent);
  font-size: 1.1rem;
}

/* ============================================================
   SERVICE CARDS (shared base)
   ============================================================ */
.service-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  transform-style: preserve-3d;
  will-change: transform;
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
}
.service-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.service-card__body {
  padding: 1.5rem;
}
.service-card__icon {
  width: 48px; height: 48px;
  background: var(--clr-surface-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--clr-accent);
  font-size: 1.3rem;
}
.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--clr-navy);
}
.service-card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
}
.service-card .learn-more {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition);
}
.service-card .learn-more:hover { gap: 0.6rem; }

/* ============================================================
   STATS
   ============================================================ */
.stats-section {
  background: var(--clr-navy);
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-item { padding: 1.5rem; }
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--clr-accent);
  line-height: 1;
  display: block;
}
.stat-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,239,230,0.8);
  margin-top: 0.5rem;
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-primary-dark);
  color: rgba(255,255,255,0.75);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 1.5rem 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--clr-accent);
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.footer-brand address, .footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.3rem;
}
.footer-brand a {
  color: rgba(255,255,255,0.75);
  transition: color var(--transition);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.3rem;
}
.footer-brand a:hover { color: var(--clr-accent); }
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-nav-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}
.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition), padding-left var(--transition);
}
.footer-nav a:hover { color: var(--clr-accent); padding-left: 4px; }
.footer-legal { font-size: 0.85rem; }
.footer-legal h4 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.75rem;
}
.footer-legal p { color: rgba(255,255,255,0.55); margin-bottom: 0.35rem; }
.footer-legal a { color: rgba(255,255,255,0.7); transition: color var(--transition); }
.footer-legal a:hover { color: var(--clr-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin: 0;
}
.footer-credit {
  background: rgba(0,0,0,0.3);
  padding: 8px 1.5rem;
  text-align: center;
}
.footer-credit p {
  font-family: 'Times New Roman', Times, serif !important;
  font-size: 10px !important;
  color: rgba(255,255,255,0.45);
  margin: 0;
  line-height: 1.4;
}
.footer-credit a {
  font-family: 'Times New Roman', Times, serif !important;
  font-size: 10px !important;
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  transition: color var(--transition);
}
.footer-credit a:hover { color: var(--clr-accent); }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MEDIA QUERIES
   ============================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}

@media (max-width: 992px) {
  :root { --nav-h: 70px; }
  .hamburger { display: flex; }
  .nav-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--clr-navy);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 999;
    padding: 2rem;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a {
    font-size: 1.4rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nav-cta { display: none; }
}

@media (max-width: 768px) {
  .section-pad { padding: 60px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; padding: 40px 1.5rem 30px; }
  .footer-legal { grid-column: auto; }
  .trust-bar__grid { gap: 1rem 1.5rem; }
  .carousel-btn { display: none; }
  .page-hero--large { height: 50vh; }
  .page-hero--mid { height: 45vh; }
}

@media (max-width: 576px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .section-pad { padding: 50px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
}
