/* Homepage-specific styling — seamless hero, atmospheric globe, compact service cards */

body.home-page {
  background:
    radial-gradient(ellipse 950px 580px at 78% 22%, rgba(14, 42, 64, 0.42) 0%, transparent 70%),
    linear-gradient(180deg, #040c15 0%, #061421 28%, #081b27 65%, #071722 100%);
  position: relative;
}

/* Header integration on homepage */
body.home-page .site-header {
  background: linear-gradient(180deg, rgba(3, 10, 17, 0.75) 0%, rgba(3, 10, 17, 0.35) 60%, transparent 100%);
  position: relative;
  z-index: 15;
}

body.home-page .primary-nav > a:not(.button) {
  text-shadow: 0 1px 8px rgba(2, 8, 14, 0.95), 0 2px 14px rgba(2, 8, 14, 0.85);
}

body.home-page .brand-words {
  text-shadow: 0 1px 8px rgba(2, 8, 14, 0.95);
}

/* Seamless backdrop spanning full viewport width from page top */
.home-hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 750px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.home-hero-globe {
  position: absolute;
  top: 20px;
  left: calc(50% - 500px);
  right: 0;
  height: 750px;
  background-image: url("/assets/globe.webp");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 15%, black 30%, black 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 6%, black 15%, black 78%, rgba(0, 0, 0, 0.5) 90%, transparent 100%);
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.4) 15%, black 30%, black 92%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 6%, black 15%, black 78%, rgba(0, 0, 0, 0.5) 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Soft atmospheric haze overlays to eliminate any hard edges */
.home-hero-globe::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #040c15 0%, rgba(4, 12, 21, 0.85) 14%, rgba(4, 12, 21, 0.25) 28%, transparent 40%),
    linear-gradient(270deg, #040c15 0%, rgba(4, 12, 21, 0.5) 4%, transparent 10%),
    linear-gradient(0deg, #061421 0%, rgba(6, 20, 33, 0.65) 12%, transparent 26%),
    linear-gradient(180deg, rgba(4, 12, 21, 0.3) 0%, transparent 12%);
  pointer-events: none;
}

/* Subtle glow reinforcement matching original mockup */
.home-hero-globe::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 36%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(100, 216, 245, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Hero section layout */
body.home-page .hero {
  position: relative;
  min-height: 440px;
  overflow: visible;
  z-index: 1;
}

body.home-page .hero-art {
  display: none;
}

body.home-page .hero-content {
  position: relative;
  z-index: 2;
  width: min(580px, 50%);
  padding-block: 16px 28px;
}

body.home-page .hero h1 {
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

body.home-page .hero .eyebrow {
  margin-bottom: 14px;
}

body.home-page .hero .gold-rule {
  margin: 22px 0 14px;
}

body.home-page .hero .hero-lede {
  margin: 16px 0 26px;
  max-width: 510px;
}

/* Decorative right-side text overlays — horizontally offset as in mockup */
.hero-side-decor {
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 20px;
  pointer-events: none;
  z-index: 3;
}

.decor-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.decor-group.decor-upper {
  position: absolute;
  top: 10px;
  right: 40px;
}

.decor-group.decor-lower {
  position: absolute;
  top: 290px;
  right: 35px;
}

.decor-line {
  font-family: Inter, "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  font-size: 8px;
  font-weight: 550;
  letter-spacing: 0.24em;
  line-height: 1.65;
  color: #c0cdd8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.decor-rule {
  width: 28px;
  height: 1.5px;
  background: #dfb377;
  margin-top: 8px;
  opacity: 0.85;
}

/* Compact four-card services section — rich dark navy translucent panels */
.services {
  padding-block: 4px 44px;
  position: relative;
  z-index: 2;
}

.services .service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.services .service-card {
  min-width: 0;
  min-height: 168px;
  padding: 16px 16px 14px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
  background: linear-gradient(155deg, rgba(3, 17, 28, 0.78) 0%, rgba(1, 10, 18, 0.88) 100%);
  border: 1px solid rgba(22, 60, 85, 0.5);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

.services .service-icon-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0;
  display: block;
}

.services .service-copy {
  min-width: 0;
}

.services .service-card h3 {
  font-size: 20px;
  line-height: 1.24;
  margin: 3px 0 7px;
}

.services .service-card p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.services .service-card .text-link {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
}

/* Responsive adjustments */
@media (max-width: 1240px) {
  .hero-side-decor {
    right: 0;
  }
}

@media (max-width: 1100px) {
  .services .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-side-decor {
    display: none;
  }
  .home-hero-globe {
    left: auto;
    right: -160px;
    width: 1200px;
    opacity: 0.85;
  }
  body.home-page .hero-content {
    width: 68%;
  }
}

@media (max-width: 900px) {
  .home-hero-globe {
    left: auto;
    right: -220px;
    width: 1100px;
    opacity: 0.75;
  }
  body.home-page .hero-content {
    width: 80%;
  }
}

@media (max-width: 760px) {
  .home-hero-backdrop {
    height: 670px;
  }
  .home-hero-globe {
    left: auto;
    top: 20px;
    right: -240px;
    width: 960px;
    height: 540px;
    opacity: 0.65;
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
  }
  body.home-page .hero {
    min-height: 580px;
    align-items: flex-end;
  }
  body.home-page .hero-content {
    width: 100%;
    padding-bottom: 28px;
  }
  .services .service-grid {
    grid-template-columns: 1fr;
  }
  .services .service-card {
    min-height: 150px;
  }
}

@media (max-width: 420px) {
  .home-hero-backdrop {
    height: 630px;
  }
  .home-hero-globe {
    top: 30px;
    right: -270px;
    opacity: 0.55;
  }
  body.home-page .hero {
    min-height: 550px;
  }
}
