/* ============================================================================
 * ai_home_uplift_hero.css
 *
 * All CSS for the AI Home Uplift page's HERO fold, extracted from
 * ai_home_uplift_2.css so the hero can be maintained in isolation (loaded
 * alongside ai_home_uplift.css via the theme's per-page widget-css picker).
 *
 * Scope: everything under `.aih-hero__*` and `.aih-btn*` used inside the
 * hero, plus the `body.ai_home_hero_pin` states that keep the site nav
 * fixed while the hero pins in the viewport.
 * ============================================================================ */

/* shared buttons, used across hero / cta */
.aih-btn {
  display: inline-block;
  border-radius: 8px;
  text-decoration: none;
  font-family: inherit;
}

.aih-btn--solid {
  padding: 13px 26px;
  background: #ffffff;
  color: #181850;
  font-size: 16px;
  font-weight: 600;
  transition: transform .2s ease, filter .2s ease;
}

.aih-btn--solid:hover { filter: brightness(0.94); color: #181850;  text-decoration: none;}

.aih-btn--solid:active { transform: scale(0.98); color: #181850;  text-decoration: none;}

.aih-btn--outline {
  padding: 12px 26px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.85);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background .2s ease;
}

.aih-btn--outline:hover { 
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
 }

/* ===== FOLD: HERO ===== */
.aih-hero__wrap {
  position: relative;
  height: 230vh;
  background: #0a0533;
}

.aih-hero__section {
  position: relative;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: 40px;
  background: #0a0533;
  overflow: hidden;
}

/* Lock hero in viewport while scroll drives the stage animation */
.aih-hero__section.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 6;
}

/* Keep site nav fixed over the hero while stage 1 → 2 runs */
body.ai_home_hero_pin #uplift_nav.main_header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100000;
  background: transparent;
  animation: none;
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

/* One-shot smooth exit after state 2 settles (no scroll-scrubbed transform) */
body.ai_home_hero_pin.ai_home_hero_nav_exit #uplift_nav.main_header {
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  pointer-events: none;
}

body.ai_home_hero_pin #uplift_nav.main_header.navigationFixed {
  background: transparent;
}

body.ai_home_hero_pin #uplift_nav.main_header.navigationFixed nav,
body.ai_home_hero_pin #uplift_nav.main_header.nav_fixed nav {
  background: transparent;
}

body.ai_home_hero_pin #uplift_nav.main_header.navigationFixed::before {
  display: none;
}

/* Park hero at the end of its scroll track */
.aih-hero__section.is-ended {
  position: absolute;
  top: auto;
  bottom: 0;
  left: 0;
  width: 100%;
}

.aih-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Scroll-scrubbed cloud fly-through (desktop only). Sits in the same
   layer slot as the fallback video; fades in once the first frame has
   been drawn (.has-cloud-seq), at which point the video is hidden. */
.aih-hero__clouds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.aih-hero__section.has-cloud-seq .aih-hero__clouds {
  opacity: 1;
}

.aih-hero__section.has-cloud-seq .aih-hero__video {
  display: none;
}

.aih-hero__video-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* background: linear-gradient(rgb(4, 3, 19, 0.60) 0%, rgb(5, 3, 27, 0.60) 50%, rgb(8, 5, 39, 0.60) 80%, rgb(13, 8, 54, 0.60) 90%, rgb(20, 12, 76, 0.60) 96%, rgb(26, 16, 96, 0.60) 100%); */
  pointer-events: none;
  background: linear-gradient(rgb(4, 3, 19, 0.82) 0%, rgb(5, 3, 27, 0.65) 50%, rgb(8, 5, 39, 0.01) 100%, rgb(13, 8, 54, 0.4) 90%, rgb(20, 12, 76, 0.4) 62%, rgb(26, 16, 96, 0.4) 100%);
}

.aih-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  /* background:
    radial-gradient(ellipse 85% 55% at 50% 108%, rgba(160, 128, 236, 0.55) 0%, rgba(105, 68, 200, 0.30) 28%, rgba(56, 32, 130, 0.14) 52%, transparent 72%),
    radial-gradient(ellipse 60% 40% at 15% 105%, rgba(90, 55, 190, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 105%, rgba(90, 55, 190, 0.28) 0%, transparent 60%); */
  pointer-events: none;
}

.aih-hero__bg::before {
  width: 620px;
  height: 480px;
  left: 50%;
  bottom: -180px;
  transform: translateX(-50%);
  background: #7d4bd8;
}

.aih-hero__bg::after {
  width: 420px;
  height: 320px;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  background: #a988ee;
  opacity: 0.35;
}

.aih-hero__bg--2 {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Sunset-above-the-deck still — the same scene the cloud fly-through
     ends on, so the scrub dissolves into it seamlessly. The gradient
     (sampled from the image) shows only while the image loads. */
  /* background:
    url("/wp-content/themes/cw_multilingual/template/assets/images/hero_sunset_bg.webp") center / cover no-repeat,
    linear-gradient(180deg, #3d3195 0%, #c1a0bc 30%, #221454 55%, #160b4e 78%, #0b0534 92%, #030121 100%); */
    /* background:
    url("https://www.cloudways.com/wp-content/uploads/2026/08/last-frame.png") center / cover no-repeat,
    linear-gradient(180deg, #3d3195 0%, #c1a0bc 30%, #221454 55%, #160b4e 78%, #0b0534 92%, #030121 100%); */
    /* background:
    url("https://www.cloudways.com/wp-content/uploads/2026/08/last-frame.png") center / cover no-repeat,
    linear-gradient(180deg, #3d3195 0%, #c1a0bc 30%, #221454 55%, #160b4e 78%, #0b0534 92%, #030121 100%); */
    background: url(https://www.cloudways.com/wp-content/uploads/2026/09/homepage_bg_1x.webp) top / cover no-repeat;
    opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Original state-2 backdrop layered over the sunset still at reduced
   opacity, so the image reads through it subtly. Lower the opacity to
   let more of the sunset show. */
/* .aih-hero__bg--2::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("https://www.cloudways.com/wp-content/uploads/2026/08/Hero-fold-bg.png") center / cover no-repeat,
    linear-gradient(180deg, #2a1a7c 0%, #452cb2 30%, #6a4bd8 55%, #a58ceb 78%, #e6ddfa 92%, #fbfaff 100%);
  opacity: 0.72;
} */

.aih-hero__img {
  position: absolute;
  left: 50%;
  top: 18%;
  width: min(925px, 68%);
  max-width: 925px;
  height: auto;
  transform: translateX(-50%);
  border-radius: 16px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  will-change: opacity, transform;
}

.aih-hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  z-index: 3;
  background: linear-gradient(180deg, transparent 0%, rgba(210, 190, 240, 0.35) 55%, rgba(233, 220, 249, 0.85) 100%);
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

.ai_home_uplift .aih-hero__section:not(.is-ready) .aih-hero__bg--2,
.ai_home_uplift .aih-hero__section:not(.is-ready) .aih-hero__fade,
.ai_home_uplift .aih-hero__section:not(.is-ready) .aih-hero__cards,
.ai_home_uplift .aih-hero__section:not(.is-ready) .aih-hero__title--b,
.ai_home_uplift .aih-hero__section:not(.is-ready) .aih-hero__sub--b {
  opacity: 0 !important;
}

.aih-hero__cards {
  
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1600px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

.aih-hero-card {
  position: absolute;
  display: block;
  /* width: clamp(160px, 16vw, 260px);
  height: auto; */
  border-radius: 14px;
  will-change: transform;
  object-fit: contain;
  /* full image visible — soft purple glow only, no crop/mask */
  /* filter:
    drop-shadow(0 10px 28px rgba(42, 26, 124, 0.35))
    drop-shadow(0 0 40px rgba(106, 75, 216, 0.28)); */
}

.aih-hero-card--1 { left: 5%; top: 20%; }

.aih-hero-card--2 { left: 2%; top: 46%; }

.aih-hero-card--3 { left: 6%; top: 70%; }

.aih-hero-card--4 { right: 5%; top: 20%; left: auto; }

.aih-hero-card--5 { right: 2%; top: 46%; left: auto; }

.aih-hero-card--6 { right: 6%; top: 70%; left: auto; }

.aih-hero__content {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.aih-hero__titles {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: center;
  /* margin-bottom: 26px; */
  overflow: visible;
}

.aih-hero__title {
  grid-area: 1 / 1;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  will-change: opacity, transform;
}

.aih-hero__title--a {
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.15;
  opacity: 1;
  color: #ffffff;
}

.aih-hero__title--a .aih-hero__word {
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  will-change: transform, opacity;
}

.aih-hero__title--b {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.3;
  opacity: 0;
  overflow: visible;
  color: #091E42;

}


.aih-hero__platform-icons-slot {
  /* visible: the icons fly out of the pill while the slot collapses */
  overflow: visible;
  max-height: 80px;
  margin-top: 24px;
  will-change: max-height, margin-top;
}

/* Pill container. The background lives on ::before and fades via
   --pill-alpha (set from JS) so the icons themselves stay visible
   while they fly out and merge into the product cards. */
.aih-hero__platform-icons {
  --pill-alpha: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
}

.aih-hero__platform-icons::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgb(83, 85, 108) 0%, rgb(44, 46, 82) 100%);
  opacity: var(--pill-alpha);
  pointer-events: none;
}

.aih-hero__picon {
  position: relative;
  display: block;
  height: clamp(30px, 2.8vw, 40px);
  width: auto;
  border-radius: 50%;
  transform-origin: center center;
  will-change: transform, opacity;
}

.aih-hero__spark-icon {
  display: inline-block;
  height: clamp(28px, 2.6vw, 40px);
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin: 0 6px;
}

.aih-hero__sub {
  margin: 0 auto 38px;
  font-size: 19px;
  line-height: 1.6;
  color: #091E42;
  max-width: 30em;
  font-weight: 400;
}

.aih-hero__sub--b {
  overflow: hidden;
  max-height: 0;
  margin: 0 auto;
  opacity: 0;
  will-change: opacity, transform, max-height;
}

.aih-hero__ctas { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.aih-hero__logos {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 24px 0 40px;
  pointer-events: none;
  will-change: opacity, transform;
}

.aih-hero__logos-caption {
  text-align: center;
  margin: 0 0 22px;
  font-weight: 500;
  margin-bottom: 50px;
}

.aih-hero__logos-caption b {
  color: inherit;
  font-weight: 700;
}

.aih-hero__logos-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.aih-hero__logos-track {
  display: flex;
  width: max-content;
  animation: aihHeroLogosScroll 40s linear infinite;
  will-change: transform;
}

.aih-hero__logos-row {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  flex-shrink: 0;
}

.aih-hero__logos-row img {
  display: block;
  height: 26px;
  width: auto;
  opacity: 1;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}

@keyframes aihHeroLogosScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 992px) {
  .aih-hero__wrap { height: auto; }
  .aih-hero__section,
  .aih-hero__section.is-fixed,
  .aih-hero__section.is-ended {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    min-height: 100vh;
    padding: 40px 0 80px;
    z-index: auto;
  }

  body.ai_home_hero_pin #uplift_nav.main_header {
    position: absolute !important;
  }
  .aih-hero__img {
    top: 22%;
    width: min(900px, 92%);
    opacity: 0.35;
  }
  .aih-hero__bg--2,
  .aih-hero__cards { display: none; }
  /* No scroll scrub on mobile — keep the looping video, drop the canvas */
  .aih-hero__clouds { display: none; }
  .aih-hero__section.has-cloud-seq .aih-hero__video { display: block; }
  .aih-hero__title--b { display: none; }
  .aih-hero__title--a { opacity: 1 !important; transform: none !important; }
  .aih-hero__platform-icons { opacity: 1 !important; transform: none !important; --pill-alpha: 1 !important; }
  .aih-hero__picon { opacity: 1 !important; transform: none !important; }
  .aih-hero__sub { font-size: 16px; margin-bottom: 28px; }

  .aih-hero__sub--b {
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 0 auto !important;
    font-size: 16px;
  }
  .aih-hero__logos {
    position: relative;
    padding: 40px 0 8px;
    opacity: 1 !important;
    transform: none !important;
  }
  .aih-hero__logos-caption { font-size: 13px; }
  .aih-hero__logos-row { gap: 44px; padding-right: 44px; }
  .aih-hero__logos-row img { height: 22px; }
}

@media (max-width: 767px) {
  .aih-hero__title--a { font-size: 32px; }
  .aih-hero__picon { height: 28px; }
  .aih-hero__platform-icons-slot { margin-top: 16px; }
  .aih-hero__ctas { flex-direction: column; }
  .aih-btn--solid,
  .aih-btn--outline { width: min(280px, 100%); text-align: center; }
}
