/* Homepage-only scroll story and project evidence band. */

.page-home {
  --mep-hero-navy: #07111f;
  --mep-hero-panel: #0b1e2d;
  --mep-hero-cyan: #76e6e6;
  --mep-hero-blue: #46a8ff;
  --mep-hero-amber: #ffb25f;
  --mep-hero-red: #ff7777;
}

.page-home #home {
  position: relative;
  background: var(--mep-hero-navy);
}

/* Keep the primary navigation available from the first frame. */
.page-home .main-nav:not(.navbar-fixed-top) {
  position: absolute !important;
  z-index: 1030;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
}

.mep-scroll-hero {
  position: relative;
  height: 230vh;
  min-height: 1320px;
  overflow: clip;
  color: #fff;
  background:
    radial-gradient(circle at 76% 36%, rgba(27, 129, 142, 0.22), transparent 33%),
    linear-gradient(145deg, #060e1b 0%, #091929 48%, #0a2631 100%);
  isolation: isolate;
}

.mep-scroll-hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
}

.mep-scroll-hero__canvas,
.mep-scroll-hero__shade,
.mep-scroll-hero__grid,
.mep-scroll-hero__noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mep-scroll-hero__canvas {
  z-index: 1;
  display: block;
}

.mep-scroll-hero__shade {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 13, 25, 0.97) 0%, rgba(5, 13, 25, 0.84) 28%, rgba(5, 13, 25, 0.24) 58%, rgba(5, 13, 25, 0.04) 100%),
    linear-gradient(180deg, rgba(5, 13, 25, 0.28), transparent 22%, transparent 78%, rgba(5, 13, 25, 0.72));
}

.mep-scroll-hero__grid {
  z-index: 0;
  opacity: 0.38;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(118, 230, 230, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 230, 230, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle at 72% 48%, #000 4%, transparent 69%);
  mask-image: radial-gradient(circle at 72% 48%, #000 4%, transparent 69%);
}

.mep-scroll-hero__noise {
  z-index: 3;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.mep-scroll-hero__content {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  height: 100%;
  padding-top: clamp(90px, 11vh, 130px);
  padding-bottom: 118px;
  pointer-events: none;
}

.mep-scroll-hero__copy {
  width: min(560px, 46vw);
  pointer-events: auto;
  will-change: opacity, transform;
  transform: translate3d(0, calc(var(--mep-hero-progress, 0) * -24px), 0);
  opacity: calc(1 - var(--mep-hero-progress, 0) * 0.54);
}

.mep-scroll-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 21px;
  color: var(--mep-hero-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1.5;
  text-transform: uppercase;
}

.mep-scroll-hero__eyebrow::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  content: "";
}

.mep-scroll-hero h1 {
  max-width: 620px;
  margin: 0;
  color: #f6fbff;
  font-size: clamp(42px, 5.2vw, 78px);
  font-weight: 300;
  letter-spacing: -0.052em;
  line-height: 0.99;
  text-wrap: balance;
}

.mep-scroll-hero h1 strong {
  color: var(--mep-hero-cyan);
  font-weight: 600;
}

.mep-scroll-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.mep-scroll-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid rgba(188, 235, 238, 0.35);
  border-radius: 999px;
  color: #f7ffff;
  background: rgba(9, 29, 43, 0.46);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mep-scroll-hero__button--primary {
  border-color: var(--mep-hero-cyan);
  color: #061520;
  background: var(--mep-hero-cyan);
  box-shadow: 0 12px 35px rgba(72, 213, 216, 0.18);
}

.mep-scroll-hero__button:hover,
.mep-scroll-hero__button:focus {
  color: #fff;
  border-color: rgba(139, 238, 238, 0.88);
  background: rgba(28, 111, 120, 0.5);
  text-decoration: none;
  transform: translateY(-2px);
}

.mep-scroll-hero__button--primary:hover,
.mep-scroll-hero__button--primary:focus {
  color: #061520;
  background: #9af4f1;
}

.mep-scroll-hero__stage-rail {
  position: absolute;
  z-index: 5;
  right: clamp(24px, 4vw, 72px);
  top: 60%;
  display: grid;
  gap: 19px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
}

.mep-scroll-hero__stage {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: rgba(229, 243, 248, 0.42);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  transition: color 220ms ease, transform 220ms ease;
}

.mep-scroll-hero__stage::after {
  width: 24px;
  height: 1px;
  background: rgba(166, 215, 222, 0.3);
  content: "";
  transition: width 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.mep-scroll-hero__stage.is-active {
  color: #ecffff;
  transform: translateX(-5px);
}

.mep-scroll-hero__stage.is-active::after {
  width: 43px;
  background: var(--mep-hero-cyan);
  box-shadow: 0 0 14px rgba(118, 230, 230, 0.72);
}

.mep-scroll-hero #tohash {
  position: absolute;
  z-index: 6;
  bottom: 24px;
  left: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(175, 225, 231, 0.32);
  border-radius: 50%;
  color: rgba(240, 255, 255, 0.86);
  background: rgba(5, 19, 31, 0.5);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.mep-scroll-hero #tohash:hover,
.mep-scroll-hero #tohash:focus {
  color: #061520;
  border-color: var(--mep-hero-cyan);
  background: var(--mep-hero-cyan);
  text-decoration: none;
}

/* Modernized project experience band, moved into the former photo-grid slot. */
.page-home #features.home-experience {
  position: relative;
  min-height: 0;
  padding: 92px 0 98px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  background:
    linear-gradient(120deg, rgba(5, 18, 31, 0.98), rgba(8, 55, 65, 0.93)),
    url(../images/features-bg.webp) center / cover no-repeat;
  background-attachment: scroll;
  isolation: isolate;
}

.page-home #features.home-experience::before,
.page-home #features.home-experience::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.page-home #features.home-experience::before {
  inset: 0;
  opacity: 0.52;
  background-image:
    linear-gradient(rgba(118, 230, 230, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(118, 230, 230, 0.055) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.page-home #features.home-experience::after {
  top: -280px;
  right: -180px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(118, 230, 230, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(118, 230, 230, 0.025), 0 0 0 145px rgba(118, 230, 230, 0.018);
}

.home-experience__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.home-experience__eyebrow {
  margin: 0 0 10px;
  color: #83e8e8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-experience__head h2 {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.home-experience__summary {
  max-width: 330px;
  margin: 0 0 4px;
  color: rgba(229, 242, 247, 0.68);
  font-size: 15px;
  line-height: 1.7;
}

.home-experience__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-experience__card {
  position: relative;
  display: grid;
  min-height: 145px;
  grid-template-columns: 43px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 14px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid rgba(166, 223, 229, 0.14);
  border-radius: 16px;
  background: rgba(8, 29, 42, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.home-experience__card::after {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(118, 230, 230, 0.08);
  border-radius: 50%;
  content: "";
}

.home-experience__card:hover {
  border-color: rgba(118, 230, 230, 0.34);
  background: rgba(12, 43, 56, 0.72);
  transform: translateY(-3px);
}

.page-home #features .home-experience__icon {
  display: grid;
  width: 43px;
  height: 43px;
  grid-row: 1 / 3;
  place-items: center;
  margin: 1px 0 0;
  border: 1px solid rgba(118, 230, 230, 0.23);
  border-radius: 12px;
  color: #83e8e8;
  background: rgba(118, 230, 230, 0.08);
  font-size: 18px;
  filter: none;
}

.page-home #features .home-experience__value {
  margin: 0;
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.page-home #features .home-experience__label {
  align-self: end;
  margin: 8px 0 0;
  color: rgba(224, 239, 245, 0.7);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.home-experience__card--featured {
  border-color: rgba(118, 230, 230, 0.28);
  background: linear-gradient(135deg, rgba(24, 113, 119, 0.62), rgba(8, 36, 50, 0.7));
}

.home-experience__card--featured .home-experience__value {
  color: #9af4f1 !important;
}

/* Bring the existing homepage sections into the same visual rhythm. */
.page-home #services {
  padding-top: 88px;
  padding-bottom: 90px;
}

.page-home #services .heading:first-of-type h2,
.page-home #services .our-services .heading h2 {
  letter-spacing: -0.035em;
}

.page-home .our-services .col-sm-4 {
  min-height: 190px;
  padding-top: 35px;
  transition: background-color 180ms ease, transform 180ms ease;
}

.page-home .our-services .col-sm-4:hover {
  background: rgba(118, 230, 230, 0.055);
  transform: translateY(-3px);
}

.page-home #about-us .about-info,
.page-home #about-us .our-skills {
  height: 100%;
  padding: 32px;
  border: 1px solid rgba(186, 230, 234, 0.14);
  border-radius: 18px;
  background: rgba(5, 18, 31, 0.58);
  box-shadow: 0 22px 45px rgba(2, 10, 21, 0.18);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

@media (max-width: 1199px) {
  .mep-scroll-hero {
    height: 205vh;
    min-height: 1160px;
  }

  .mep-scroll-hero__copy {
    width: min(530px, 53vw);
  }

  .mep-scroll-hero__stage-rail {
    right: 24px;
  }

  .mep-scroll-hero__stage span {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .home-experience__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .mep-scroll-hero {
    height: 120vh;
    height: 120svh;
    min-height: 760px;
  }

  .mep-scroll-hero__sticky {
    min-height: 620px;
  }

  .mep-scroll-hero__shade {
    background:
      linear-gradient(180deg, rgba(5, 13, 25, 0.97) 0%, rgba(5, 13, 25, 0.86) 47%, rgba(5, 13, 25, 0.2) 76%, rgba(5, 13, 25, 0.7) 100%),
      radial-gradient(circle at 55% 68%, transparent 0%, rgba(5, 13, 25, 0.28) 70%);
  }

  .mep-scroll-hero__grid {
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 90%);
    mask-image: linear-gradient(180deg, transparent, #000 28%, #000 90%);
  }

  .mep-scroll-hero__content {
    display: block;
    padding-top: 116px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .mep-scroll-hero__copy {
    width: 100%;
    max-width: 510px;
    transform: translate3d(0, calc(var(--mep-hero-progress, 0) * -12px), 0);
    opacity: calc(1 - var(--mep-hero-progress, 0) * 0.38);
  }

  .mep-scroll-hero h1 {
    max-width: 480px;
    font-size: clamp(36px, 10.5vw, 52px);
    line-height: 1.02;
  }

  .mep-scroll-hero__actions {
    margin-top: 23px;
  }

  .mep-scroll-hero__button {
    min-height: 46px;
    padding: 11px 17px;
    font-size: 12px;
  }

  /* Phones read the stage names left-to-right under the copy instead of the
     desktop rail, so the labels stay legible next to the animation. */
  .mep-scroll-hero__stage-rail {
    top: auto;
    right: 22px;
    /* Clears the fixed WhatsApp button that sits in the bottom-right corner. */
    bottom: 168px;
    left: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    transform: none;
  }

  .mep-scroll-hero__stage {
    flex: 0 0 auto;
    gap: 7px;
    color: rgba(229, 243, 248, 0.58);
  }

  .mep-scroll-hero__stage span {
    font-size: 9.5px;
    letter-spacing: 0.06em;
  }

  .mep-scroll-hero__stage::after {
    order: -1;
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  .mep-scroll-hero__stage.is-active {
    transform: none;
  }

  .mep-scroll-hero__stage.is-active::after {
    width: 6px;
  }

  .mep-scroll-hero #tohash {
    right: 18px;
    bottom: 18px;
    left: auto;
    transform: none;
  }

  .page-home #features.home-experience {
    padding: 70px 0 74px;
  }

  .home-experience__head {
    display: block;
    margin-bottom: 28px;
  }

  .home-experience__summary {
    max-width: 520px;
    margin-top: 16px;
  }

  .home-experience__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .home-experience__card {
    min-height: 126px;
    grid-template-columns: 36px 1fr;
    column-gap: 10px;
    padding: 16px 13px;
    border-radius: 13px;
  }

  .page-home #features .home-experience__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
  }

  .page-home #features .home-experience__value {
    font-size: 27px;
  }

  .page-home #features .home-experience__label {
    font-size: 11px;
  }

  .page-home #services {
    padding-top: 68px;
    padding-bottom: 70px;
  }

  .page-home #about-us .about-info,
  .page-home #about-us .our-skills {
    height: auto;
    margin-bottom: 18px;
    padding: 23px;
    border-radius: 15px;
  }
}

@media (max-width: 390px) {
  .mep-scroll-hero__eyebrow {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .mep-scroll-hero__actions {
    gap: 8px;
  }

  .mep-scroll-hero__button {
    padding-right: 14px;
    padding-left: 14px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .mep-scroll-hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }

  .mep-scroll-hero__sticky {
    position: relative;
    min-height: 720px;
  }

  .mep-scroll-hero__copy {
    opacity: 1;
    transform: none;
  }

  .mep-scroll-hero__button {
    transition: none;
  }
}

@media print {
  .mep-scroll-hero {
    height: auto;
    min-height: 680px;
  }

  .mep-scroll-hero__sticky {
    position: relative;
    height: 680px;
  }

  .mep-scroll-hero__noise,
  .mep-scroll-hero__stage-rail,
  .mep-scroll-hero #tohash {
    display: none;
  }
}
