/* ── Home page animations and splash screen ── */

#page-wrapper {
  transition: opacity .6s ease 0.2s;
  opacity: 0;
}

#page-wrapper.unblur {
  opacity: 1;
}

#nav-placeholder .logo-img-nav {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#nav-placeholder .logo-img-nav.logo-visible {
  opacity: 1;
}

#splash-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(245, 243, 239, .97);
  transition: opacity .8s ease;
}

#splash-backdrop.fade-out {
  opacity: 0;
  pointer-events: none;
}

#flying-logo {
  position: fixed;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  animation: logoAppear 3s ease 1s forwards;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.25));
}

#flying-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes logoAppear {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#flying-logo.fly {
  transition:
    top    1s cubic-bezier(.4, 0, .2, 1),
    left   1s cubic-bezier(.4, 0, .2, 1),
    width  1s cubic-bezier(.4, 0, .2, 1),
    height 1s cubic-bezier(.4, 0, .2, 1),
    border-radius 1s ease,
    opacity .35s ease .75s;
}

#flying-logo.fly.arrived {
  opacity: 0;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.bounce-anim {
  animation: bounce 1.5s ease-in-out infinite;
}

/* ── Home page hero section ── */

.home-hero-section {
  min-height: 80vh;
}

.home-hero-inner {
  max-width: 900px;
}

.home-hero-title {
  font-size: clamp(2.2rem, 8vw, 6rem);
  letter-spacing: .05em;
}

.home-hero-tagline {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
}

.home-hero-frame {
  max-width: 700px;
}

.home-hero-corner {
  position: absolute;
  width: 32px;
  height: 32px;
}

.home-hero-corner--tl {
  top: -8px;
  left: -8px;
  border-top: 2px solid var(--rosewood);
  border-left: 2px solid var(--rosewood);
}

.home-hero-corner--tr {
  top: -8px;
  right: -8px;
  border-top: 2px solid var(--rosewood);
  border-right: 2px solid var(--rosewood);
}

.home-hero-corner--bl {
  bottom: -8px;
  left: -8px;
  border-bottom: 2px solid var(--rosewood);
  border-left: 2px solid var(--rosewood);
}

.home-hero-corner--br {
  bottom: -8px;
  right: -8px;
  border-bottom: 2px solid var(--rosewood);
  border-right: 2px solid var(--rosewood);
}

.home-hero-video-frame {
  background: linear-gradient(135deg, rgba(74, 93, 74, .05), rgba(101, 66, 74, .05));
  border-color: rgba(74, 93, 74, .2) !important;
}

/* ── Home page cards ── */

.index-card.h-100 {
  height: 100% !important;
}

.services-card--military {
  border-top: 4px solid var(--military);
}

.services-card--rosewood {
  border-top: 4px solid var(--rosewood);
}

.services-card-title {
  font-size: 2.8rem;
  letter-spacing: .05em;
}

.services-card-desc {
  opacity: .7;
  font-size: 1rem;
  line-height: 1.7;
  text-align: justify;
}

/* ── Image utilities ── */

.custom-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-hover:hover .custom-image {
  transform: scale(1.05);
}

/* ── Carousel styling ── */

#news-carousel {
  height: 100%;
  max-height: 400px;
}

.carousel-inner {
  height: 100%;
}

.carousel-item {
  height: 100%;
}

.carousel-card {
  height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.carousel-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), transparent);
  padding: 2rem 1rem 1rem 1rem;
  z-index: 10;
}

.carousel-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: white !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  transition: color 0.3s ease;
  line-height: 1.2;
}

.carousel-card:hover .carousel-card-title {
  color: var(--cream) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 1rem;
  height: 1rem;
  background-image: none !important;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.carousel-control-prev-icon {
  transform: rotate(135deg);
}

.carousel-control-next-icon {
  transform: rotate(-45deg);
}

 @media (max-width: 767px) {
    .services-card-title {
      font-size: 1.8rem;
      }
    }
