/* =========================================================
   iCost live visual layer
   Pexels imagery, richer landing motion, scroll activity
   ========================================================= */

:root {
  --imageHero: url("https://images.pexels.com/photos/8961127/pexels-photo-8961127.jpeg?auto=compress&cs=tinysrgb&w=2000");
  --imageBlueprint: url("https://images.pexels.com/photos/3932298/pexels-photo-3932298.jpeg?auto=compress&cs=tinysrgb&w=1600");
  --imageSite: url("https://images.pexels.com/photos/8961073/pexels-photo-8961073.jpeg?auto=compress&cs=tinysrgb&w=1800");
  --imageOffice: url("https://images.pexels.com/photos/6285146/pexels-photo-6285146.jpeg?auto=compress&cs=tinysrgb&w=1600");
  --imageData: url("https://images.pexels.com/photos/8470810/pexels-photo-8470810.jpeg?auto=compress&cs=tinysrgb&w=1600");
  --imageBuilding: url("https://images.pexels.com/photos/29197533/pexels-photo-29197533.jpeg?auto=compress&cs=tinysrgb&w=1800");
  --heroPointerX: 68%;
  --heroPointerY: 30%;
}

body {
  overflow-x: hidden;
}

.scrollProgressTrack {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 12000;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.scrollProgressTrack span {
  display: block;
  width: 0;
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green), #b7ec61 45%, var(--blue));
  box-shadow: 0 0 16px rgba(147, 213, 47, 0.36);
}

/* Hero motion */
.hero {
  isolation: isolate;
  background: var(--navyDark);
}

.heroMotionPhoto,
.heroSweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heroMotionPhoto {
  z-index: 0;
  inset: -6%;
  background: var(--imageHero) center 48% / cover no-repeat;
  filter: saturate(0.86) contrast(1.04);
  transform: scale(1.05);
  animation: heroPhotoDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}

.hero::before {
  z-index: 1;
  background:
    radial-gradient(circle at var(--heroPointerX) var(--heroPointerY), rgba(147, 213, 47, 0.16), transparent 22%),
    radial-gradient(circle at 72% 27%, rgba(35, 111, 183, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(6, 24, 39, 0.97) 0%, rgba(7, 38, 62, 0.93) 44%, rgba(6, 24, 39, 0.67) 100%);
  transition: background 240ms ease;
}

.hero::after {
  z-index: 3;
}

.heroSweep {
  z-index: 1;
  width: 42%;
  left: -45%;
  right: auto;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.02) 35%, rgba(147,213,47,0.10) 49%, rgba(255,255,255,0.025) 62%, transparent 100%);
  transform: skewX(-12deg);
  animation: heroSweepAcross 10s ease-in-out 3s infinite;
}

.heroGrid {
  z-index: 1;
  animation: heroGridDrift 22s linear infinite;
}

.heroInner {
  z-index: 4;
}

.heroCopy {
  position: relative;
}

.heroCopy::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  left: -150px;
  top: 22%;
  border-radius: 50%;
  border: 1px solid rgba(147, 213, 47, 0.10);
  box-shadow: 0 0 0 58px rgba(147, 213, 47, 0.018), 0 0 0 116px rgba(35, 111, 183, 0.016);
  animation: ambientRing 8s ease-in-out infinite;
  pointer-events: none;
}

.hero .buttonPrimary {
  position: relative;
  overflow: hidden;
}

.hero .buttonPrimary::after {
  content: "";
  position: absolute;
  inset: -100% auto -100% -45%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.46), transparent);
  transform: skewX(-18deg);
  animation: buttonShine 5.5s ease-in-out 2.2s infinite;
}

.heroScrollCue {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 30px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.62);
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 260ms ease, transform 260ms ease;
}

.heroScrollCue i {
  position: relative;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.34);
  border-radius: 999px;
}

.heroScrollCue i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--green);
  animation: scrollCueDot 1.65s ease-in-out infinite;
}

body.hasScrolled .heroScrollCue {
  opacity: 0;
  transform: translate(-50%, 12px);
}

.dashboardScene::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 78%;
  aspect-ratio: 1;
  right: -12%;
  top: -15%;
  border: 1px solid rgba(147,213,47,0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(35,111,183,0.025), 0 0 0 78px rgba(147,213,47,0.018);
  animation: dashboardHalo 14s linear infinite;
  pointer-events: none;
}

/* Image backed capability band */
.trustBar {
  margin-top: -46px;
}

.trustInner {
  position: relative;
  padding: 12px;
  gap: 12px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
}

.trustCard {
  position: relative;
  min-height: 182px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  border: 0;
  box-shadow: 0 10px 30px rgba(6,24,39,0.12);
}

.trustCardImage,
.trustCardShade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trustCardImage {
  z-index: 0;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(0.85) contrast(1.03);
  transition: transform 0.95s var(--icMotionEase), filter 0.4s ease;
}

.trustCardShade {
  z-index: 1;
  background: linear-gradient(180deg, rgba(6,24,39,0.16) 0%, rgba(6,24,39,0.82) 72%, rgba(6,24,39,0.95) 100%);
}

.trustCardContent {
  position: absolute;
  z-index: 2;
  inset: auto 18px 18px 18px;
}

.trustCardContent small {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.trustCard .trustCardContent strong {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 6px;
}

.trustCard .trustCardContent span {
  color: rgba(255,255,255,0.72);
  font-size: 0.76rem;
  line-height: 1.45;
}

.trustCard:hover .trustCardImage {
  transform: scale(1.13);
  filter: saturate(1) contrast(1.04);
}

.trustCard:hover {
  transform: translateY(-7px);
  box-shadow: 0 20px 44px rgba(6,24,39,0.19);
}

.capabilityTicker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-top: 34px;
  border-top: 1px solid rgba(12,60,96,0.08);
  border-bottom: 1px solid rgba(12,60,96,0.08);
  background: linear-gradient(90deg, #fbfdff, #f3f8fb, #fbfdff);
}

.capabilityTicker::before,
.capabilityTicker::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
}

.capabilityTicker::before { left: 0; background: linear-gradient(90deg, #fff, transparent); }
.capabilityTicker::after { right: 0; background: linear-gradient(270deg, #fff, transparent); }

.tickerTrack {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
  color: #35516b;
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: capabilityTickerMove 31s linear infinite;
}

.tickerTrack i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(147,213,47,0.08);
}

.capabilityTicker:hover .tickerTrack {
  animation-play-state: paused;
}

/* More visual service section */
.sectionVisual {
  overflow: hidden;
}

.sectionVisual > .container {
  position: relative;
  z-index: 2;
}

#services::before,
#why::before,
#projects::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  opacity: 0.055;
  filter: grayscale(0.25) saturate(0.75);
}

#services::before {
  width: 48vw;
  height: 86%;
  right: -12vw;
  top: 7%;
  border-radius: 48% 0 0 48%;
  background-image: url("https://images.pexels.com/photos/8961073/pexels-photo-8961073.jpeg?auto=compress&cs=tinysrgb&w=1500");
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
}

#why::before {
  width: 42vw;
  height: 100%;
  left: -12vw;
  top: 0;
  background-image: url("https://images.pexels.com/photos/6285146/pexels-photo-6285146.jpeg?auto=compress&cs=tinysrgb&w=1500");
  mask-image: linear-gradient(270deg, transparent 0%, #000 55%);
}

#projects::before {
  width: 46vw;
  height: 100%;
  right: -11vw;
  top: 0;
  background-image: url("https://images.pexels.com/photos/29197533/pexels-photo-29197533.jpeg?auto=compress&cs=tinysrgb&w=1500");
  mask-image: linear-gradient(90deg, transparent 0%, #000 52%);
}

.serviceGrid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.serviceCard {
  grid-column: span 2;
  min-height: 430px;
  padding: 0;
  background: rgba(255,255,255,0.96);
  border-color: rgba(12,60,96,0.10);
  box-shadow: 0 14px 40px rgba(6,24,39,0.08);
}

.serviceCard:nth-child(4),
.serviceCard:nth-child(5) {
  grid-column: span 3;
}

.serviceMedia {
  position: relative;
  height: 178px;
  overflow: hidden;
  background: #dbe4ec;
}

.serviceMedia::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,24,39,0.02), rgba(6,24,39,0.28));
  pointer-events: none;
}

.serviceMedia img {
  width: 100%;
  height: 118%;
  object-fit: cover;
  transform: translate3d(0, var(--icMediaY, -5%), 0) scale(1.045);
  transition: transform 0.85s var(--icMotionEase), filter 0.4s ease;
  will-change: transform;
}

.serviceBody {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
}

.serviceCard::before {
  z-index: 4;
  top: 154px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(6,24,39,0.22);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.serviceCard:hover .serviceMedia img {
  transform: translate3d(0, var(--icMediaY, -5%), 0) scale(1.12);
  filter: saturate(1.06);
}

.serviceCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 56px rgba(6,24,39,0.15);
}

/* Richer imagery and depth through the remaining sections */
.imageFrame::before {
  background:
    linear-gradient(180deg, rgba(6,24,39,0.08), rgba(6,24,39,0.56)),
    var(--imageSite) center calc(50% + var(--icMediaY, 0px)) / cover no-repeat;
  transform: scale(1.07);
  transition: transform 1.1s var(--icMotionEase);
}

.imageFrame:hover::before {
  transform: scale(1.12);
}

.sectionDark {
  background:
    linear-gradient(135deg, rgba(6,24,39,0.96), rgba(12,60,96,0.91)),
    var(--imageBuilding) center calc(50% + var(--icMediaY, 0px)) / cover no-repeat;
}

.sectionDark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  animation: processGridDrift 28s linear infinite;
  pointer-events: none;
}

.numberItem {
  overflow: hidden;
}

.numberItem::before {
  transition: transform 0.55s var(--icMotionEase), color 0.3s ease;
}

.numberItem:hover::before {
  transform: translateY(-5px) scale(1.08);
}

.sectorCard {
  transform: translateZ(0);
}

.sectorCard::before {
  background-position: center calc(50% + var(--icMediaY, 0px));
}

.whyCard {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 35px rgba(6,24,39,0.06);
}

.whyCard::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -42px;
  top: -42px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147,213,47,0.16), transparent 68%);
  transform: scale(0.75);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.65s var(--icMotionEase);
}

.whyCard:hover::before,
.whyCard.icostInView::before {
  opacity: 1;
  transform: scale(1.18);
}

.aboutPanel {
  position: relative;
}

.aboutImage {
  background:
    linear-gradient(180deg, rgba(6,24,39,0.08), rgba(6,24,39,0.40)),
    var(--imageOffice) center calc(50% + var(--icMediaY, 0px)) / cover no-repeat;
}

.aboutCopy {
  position: relative;
  overflow: hidden;
}

.aboutCopy::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -160px;
  bottom: -180px;
  border: 1px solid rgba(147,213,47,0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(147,213,47,0.025);
  animation: ambientRing 9s ease-in-out infinite reverse;
  pointer-events: none;
}

.quoteCard {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.quoteCard::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: var(--caseImage) center / cover no-repeat;
  opacity: 0.055;
  transform: scale(1.04);
  transition: opacity 0.45s ease, transform 0.85s var(--icMotionEase);
}

.quoteCard::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,250,253,0.88));
}

.quoteCard:hover::before {
  opacity: 0.13;
  transform: scale(1.10);
}

.insightImage {
  background-position: center calc(50% + var(--icMediaY, 0px));
}

.insightCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 50px rgba(6,24,39,0.13);
}

.faqItem.active {
  box-shadow: 0 14px 40px rgba(6,24,39,0.08);
  border-color: rgba(35,111,183,0.22);
}

.cta {
  background:
    linear-gradient(135deg, rgba(6,24,39,0.94), rgba(12,60,96,0.88)),
    var(--imageData) center calc(50% + var(--icMediaY, 0px)) / cover no-repeat;
}

/* Active scroll state */
.sectionVisual .sectionHeader,
.sectionVisual .serviceGrid,
.sectionVisual .whyGrid,
.sectionVisual .quoteGrid,
.sectionVisual .insightGrid {
  transition: transform 0.7s var(--icMotionEase);
}

.sectionVisual.sectionActive .sectionHeader {
  transform: translateY(-3px);
}

.sectionVisual.sectionActive .label {
  text-shadow: 0 0 18px rgba(35,111,183,0.10);
}

.trustCard.icostInView .trustCardImage,
.serviceCard.icostInView .serviceMedia img,
.insightCard.icostInView .insightImage {
  animation: mediaSettle 1.35s var(--icMotionEase) both;
}

/* Keyframes */
@keyframes heroPhotoDrift {
  0% { transform: scale(1.05) translate3d(-0.7%, -0.3%, 0); }
  100% { transform: scale(1.12) translate3d(1.2%, 0.8%, 0); }
}

@keyframes heroSweepAcross {
  0%, 22% { left: -48%; opacity: 0; }
  32% { opacity: 0.75; }
  60% { left: 112%; opacity: 0; }
  100% { left: 112%; opacity: 0; }
}

@keyframes heroGridDrift {
  to { background-position: 128px 64px, 64px 128px; }
}

@keyframes ambientRing {
  0%, 100% { transform: scale(0.92); opacity: 0.54; }
  50% { transform: scale(1.08); opacity: 0.95; }
}

@keyframes buttonShine {
  0%, 35% { left: -45%; }
  56%, 100% { left: 125%; }
}

@keyframes scrollCueDot {
  0% { transform: translateY(0); opacity: 0; }
  22% { opacity: 1; }
  78% { opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

@keyframes dashboardHalo {
  to { transform: rotate(360deg); }
}

@keyframes capabilityTickerMove {
  to { transform: translateX(-50%); }
}

@keyframes processGridDrift {
  to { background-position: 144px 72px, 72px 144px; }
}

@keyframes mediaSettle {
  from { filter: saturate(0.55); }
  to { filter: saturate(1); }
}

@media (max-width: 1120px) {
  .serviceGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .serviceCard,
  .serviceCard:nth-child(4),
  .serviceCard:nth-child(5) {
    grid-column: auto;
  }

  .serviceCard:last-child {
    grid-column: 1 / -1;
  }

  .trustCard {
    min-height: 165px;
  }

  .heroScrollCue {
    display: none;
  }
}

@media (max-width: 840px) {
  .trustInner,
  .serviceGrid {
    grid-template-columns: 1fr 1fr;
  }

  .serviceCard:last-child {
    grid-column: 1 / -1;
  }

  .serviceMedia {
    height: 155px;
  }

  #services::before,
  #why::before,
  #projects::before {
    width: 80vw;
    opacity: 0.035;
  }

  .capabilityTicker::before,
  .capabilityTicker::after {
    width: 54px;
  }
}

@media (max-width: 560px) {
  .trustInner,
  .serviceGrid {
    grid-template-columns: 1fr;
  }

  .serviceCard:last-child {
    grid-column: auto;
  }

  .trustCard {
    min-height: 178px;
  }

  .capabilityTicker {
    margin-top: 22px;
  }

  .tickerTrack {
    gap: 22px;
    font-size: 0.69rem;
  }

  .heroMotionPhoto {
    background-position: 64% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heroMotionPhoto,
  .heroSweep,
  .heroGrid,
  .heroCopy::before,
  .hero .buttonPrimary::after,
  .heroScrollCue i::after,
  .dashboardScene::after,
  .tickerTrack,
  .sectionDark::before,
  .aboutCopy::after,
  .trustCard.icostInView .trustCardImage,
  .serviceCard.icostInView .serviceMedia img,
  .insightCard.icostInView .insightImage {
    animation: none !important;
  }

  .scrollProgressTrack {
    display: none;
  }
}
