/* =========================================================
   Anyone Home — Maintenance Assistant / How It Works
   Cinematic workflow section
   ========================================================= */

.ah-maintenance-flow-section {
  position: relative;
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(7, 111, 156, 0.34) 0%,
      rgba(7, 111, 156, 0.08) 36%,
      transparent 62%
    ),
    linear-gradient(135deg, #04182a 0%, #052840 58%, #063a56 100%) !important;
}

.ah-maintenance-flow-section::before,
.ah-maintenance-flow-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
}

.ah-maintenance-flow-section::before {
  width: min(62vw, 980px);
  aspect-ratio: 1;
  top: -42%;
  left: -18%;
  background: radial-gradient(
    circle,
    rgba(135, 207, 54, 0.08),
    transparent 67%
  );
}

.ah-maintenance-flow-section::after {
  width: min(56vw, 900px);
  aspect-ratio: 1;
  right: -19%;
  bottom: -52%;
  background: radial-gradient(circle, rgba(6, 111, 156, 0.3), transparent 67%);
}

.ah-maintenance-flow-section .et_pb_row,
.ah-maintenance-flow-section .et_pb_column,
.ah-maintenance-flow-section .et_pb_module,
.ah-maintenance-flow-section .et_pb_text_inner {
  position: relative;
  z-index: 1;
}

.ah-ma-flow {
  width: 100%;
}

.ah-ma-flow__header {
  max-width: 980px;
  /*   margin: 0 auto 76px; */
  margin: 0 auto;
  text-align: center;
}

.ah-ma-flow__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #87cf36;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 2.8px;
  text-transform: uppercase;
}

.ah-ma-flow__eyebrow::before,
.ah-ma-flow__eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: rgba(135, 207, 54, 0.65);
}

.ah-ma-flow__title {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(46px, 5.1vw, 76px) !important;
  font-weight: 700 !important;
  line-height: 0.98em !important;
  letter-spacing: -2.8px !important;
  text-wrap: balance;
}

.ah-ma-flow__title span {
  color: #87cf36;
}

.ah-ma-flow__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  padding-top: 76px;
}

.ah-ma-flow__track {
  position: absolute;
  top: 28px;
  left: 16.666%;
  width: 66.668%;
  height: 2px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.13);
}

.ah-ma-flow__track-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #87cf36 0%, #6ccf86 48%, #33b8d4 100%);
  box-shadow: 0 0 18px rgba(135, 207, 54, 0.42);
}

.ah-ma-step {
  position: relative;
  min-width: 0;
  min-height: 590px;
  padding: 36px 30px 32px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.085) 0%,
    rgba(255, 255, 255, 0.035) 100%
  );
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
  transition:
    border-color 300ms ease,
    background-color 300ms ease,
    box-shadow 300ms ease;
}

.ah-ma-step:hover {
  border-color: rgba(135, 207, 54, 0.32);
  box-shadow:
    0 30px 76px rgba(0, 0, 0, 0.27),
    0 0 50px rgba(7, 111, 156, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.ah-ma-step__node {
  position: absolute;
  top: -56px;
  left: 50%;
  z-index: 4;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border: 4px solid #052840;
  border-radius: 50%;
  background: #87cf36;
  box-shadow:
    0 0 0 1px rgba(135, 207, 54, 0.85),
    0 0 22px rgba(135, 207, 54, 0.48);
}

/* .ah-ma-step__ghost {
  position: absolute;
  top: 4px;
  right: 19px;
  z-index: 0;
  color: rgba(255, 255, 255, 0.045);
  font-size: clamp(90px, 8vw, 138px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -8px;
  user-select: none;
} */

.ah-ma-step__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  margin-bottom: 24px;
}

.ah-ma-step__halo {
  position: absolute;
  inset: 12% 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(7, 111, 156, 0.28),
    rgba(7, 111, 156, 0.07) 48%,
    transparent 72%
  );
  filter: blur(4px);
  transform: scale(0.94);
}

.ah-ma-step__visual img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.24));
  will-change: transform;
}

.ah-ma-step--1 .ah-ma-step__visual img {
  width: min(84%, 285px);
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

.ah-ma-step--2 .ah-ma-step__visual img {
  width: auto;
  max-height: 318px;
}

.ah-ma-step--3 .ah-ma-step__visual img {
  width: 116%;
  max-width: 500px;
  max-height: 320px;
}

.ah-ma-step__copy {
  position: relative;
  z-index: 2;
  text-align: left;
}

.ah-ma-step__kicker {
  display: block;
  margin-bottom: 11px;
  color: #87cf36;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 1.9px;
  text-transform: uppercase;
}

.ah-ma-step__copy h3 {
  margin: 0 0 13px !important;
  padding: 0 !important;
  color: #fff !important;
  font-size: clamp(24px, 2vw, 30px) !important;
  font-weight: 700 !important;
  line-height: 1.08em !important;
  letter-spacing: -0.8px !important;
}

.ah-ma-step__copy p {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 16px !important;
  line-height: 1.65em !important;
}

.ah-ma-flow__footnote {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  width: min(100%, 1120px);
  margin: 46px auto 0;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.ah-ma-flow__footnote-mark {
  flex: 0 0 auto;
  color: #87cf36;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.ah-ma-flow__footnote p {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.61) !important;
  font-size: 13px !important;
  font-style: italic;
  line-height: 1.65em !important;
}

/* Tablet + mobile: stack the workflow and use viewport reveals rather than pinning. */
@media (max-width: 1099px) {
  .ah-maintenance-flow-section {
    padding-top: 92px !important;
    padding-bottom: 92px !important;
  }

  .ah-ma-flow__header {
    margin-bottom: 54px;
  }

  .ah-ma-flow__steps {
    display: flex;
    flex-direction: column;
    gap: 26px;
    max-width: 720px;
    margin: 0 auto;
    padding-top: 0;
  }

  .ah-ma-flow__track {
    display: none;
  }

  .ah-ma-step {
    min-height: 0;
    padding: 34px 30px 32px;
  }

  .ah-ma-step__node {
    top: 28px;
    left: 30px;
    width: 13px;
    height: 13px;
    transform: none;
    border-width: 3px;
  }

  /* .ah-ma-step__ghost {
    top: 8px;
    right: 24px;
  } */

  .ah-ma-step__visual {
    height: 300px;
    margin: 12px 0 20px;
  }

  .ah-ma-step__copy {
    max-width: 600px;
  }

  .ah-ma-flow__footnote {
    max-width: 720px;
    margin-top: 28px;
  }
}

@media (max-width: 767px) {
  .ah-maintenance-flow-section {
    padding-top: 72px !important;
    padding-bottom: 72px !important;
  }

  .ah-ma-flow__header {
    margin-bottom: 38px;
  }

  .ah-ma-flow__eyebrow {
    font-size: 11px;
    letter-spacing: 2.2px;
  }

  .ah-ma-flow__eyebrow::before,
  .ah-ma-flow__eyebrow::after {
    width: 18px;
  }

  .ah-ma-flow__title {
    font-size: clamp(38px, 11vw, 52px) !important;
    letter-spacing: -1.8px !important;
  }

  .ah-ma-step {
    padding: 28px 22px 26px;
    border-radius: 24px;
  }

  .ah-ma-step__node {
    top: 23px;
    left: 23px;
  }

  .ah-ma-step__visual {
    height: 255px;
  }

  .ah-ma-step--1 .ah-ma-step__visual img {
    width: min(78%, 245px);
  }

  .ah-ma-step--2 .ah-ma-step__visual img {
    max-height: 248px;
  }

  .ah-ma-step--3 .ah-ma-step__visual img {
    width: 108%;
    max-height: 255px;
  }

  .ah-ma-step__kicker {
    font-size: 11px;
    letter-spacing: 1.6px;
  }

  .ah-ma-step__copy h3 {
    font-size: 25px !important;
  }

  .ah-ma-step__copy p {
    font-size: 15px !important;
  }

  .ah-ma-flow__footnote {
    gap: 11px;
    padding: 17px 18px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ah-ma-flow__track-fill {
    transform: scaleX(1) !important;
  }

  .ah-ma-step,
  .ah-ma-step__visual img,
  .ah-ma-flow__header,
  .ah-ma-flow__footnote {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    filter: none !important;
  }
}

@media (min-width: 1100px) {
  .js-ah-maintenance-flow-section {
    min-height: 100vh;
  }
}