/* MVP Home Services - Global Styles */
:root {
  --brand: #f4b400; /* construction yellow */
  --brand-dark: #d39c00;
  --ink: #0b132b;
  --muted: #6c757d;
}

html,
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  scroll-behavior: smooth;
}

/*******************
    Preloader Animation
  *******************/
.preloader {
  position: fixed;
  inset: 0;
  background: #ffffff; /* flat white */
  color: var(--ink);
  z-index: 2000;
  transition: opacity 500ms ease, visibility 500ms ease;
}
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Crane scene */
.crane {
  width: 280px;
  height: 130px;
  position: relative;
}

.crane .mast {
  position: absolute;
  left: 12px;
  bottom: 8px;
  width: 6px;
  height: 92px;
  background: linear-gradient(#113, #335);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05) inset;
}
.crane .arm {
  position: absolute;
  left: 12px;
  top: 16px;
  height: 6px;
  width: 240px;
  background: var(--brand);
  transform-origin: left center;
  animation: armSlide 2.8s ease-in-out infinite;
}
.crane .cable {
  position: absolute;
  top: 22px;
  left: 136px;
  width: 2px;
  height: 70px;
  background: var(--brand);
  animation: cableMove 2.8s ease-in-out infinite;
}
.crane .hook {
  position: absolute;
  top: 88px;
  left: 127px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--brand);
  border-top: none;
  border-right: none;
  transform: rotate(45deg);
  animation: hookBob 1.2s ease-in-out infinite;
}
.crane .block {
  position: absolute;
  top: 102px;
  left: 122px;
  width: 30px;
  height: 18px;
  background: var(--brand);
  border-radius: 2px;
  animation: blockLift 2.8s ease-in-out infinite;
}

@keyframes armSlide {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}
@keyframes cableMove {
  0%,
  100% {
    left: 136px;
  }
  50% {
    left: 166px;
  }
}
@keyframes hookBob {
  0%,
  100% {
    transform: translateY(0) rotate(45deg);
  }
  50% {
    transform: translateY(6px) rotate(45deg);
  }
}
@keyframes blockLift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, -24px);
  }
}

.loader-brand .wordmark {
  letter-spacing: 0.5px;
  color: var(--ink);
}
.loader-brand .subtle {
  opacity: 0.75;
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Progress bar tint */
.progress {
  background: rgba(0, 0, 0, 0.08);
}
.progress-bar {
  background-color: var(--brand);
}

/*******************
    Hero
  *******************/
.hero {
  min-height: 92vh;
  display: grid;
  align-items: center;
  background: #001845;
}

.hero .hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=2000&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  transform: scale(1.05);
}

.hero-bottom-gradient {
  display: none;
}

/* Buttons */
.btn-brand {
  background: var(--brand);
  color: #1a1300;
  border-color: var(--brand);
}
.btn-brand:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #1a1300;
}
.brand-badge {
  display: inline-block;
  background: var(--brand);
  color: #1a1300;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Site logo sizing */
.site-logo {
  width: 56px;
  height: auto;
  max-height: 64px;
}

@media (min-width: 992px) {
  .site-logo {
    width: 72px;
    max-height: 80px;
  }
}

/* Sections */
.page-hero {
  margin-top: 64px;
}
.pt-7 {
  padding-top: 6rem !important;
}

/* Cards */
.service-card .icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(244, 180, 0, 0.15);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}
/* Make service cards more boxy and square */
.service-card {
  border-radius: 10px !important; /* Sharper corners */
  aspect-ratio: 5/4; /* Try to keep cards square */
  min-height: 200px; /* Ensures boxy look on all screens */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-card .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Stats */
.stat .counter {
  color: var(--ink);
}

/* Gallery */
.gallery-grid .gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-grid .gallery-item:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Testimonials larger and boxier */
.testimonials {
  padding-top: 6rem;
  padding-bottom: 6rem;
}
.testimonial-card {
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.testimonial-card .lead {
  line-height: 1.65;
}

/* CTA grid background */
.cta-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 250ms ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Footer */
footer a {
  text-decoration: none;
}

/* Utilities */
.fw-extrabold {
  font-weight: 800;
}

/* Small tweaks */
.navbar.scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}
