/* P0 homepage Hero: the supplied optical artwork is the complete visual. */
#app .home-page {
  background: radial-gradient(ellipse 53% 61% at 71% 42%, #edf5ff 0%, #f9fcff 55%, transparent 100%), #fbfdff;
}

#app .home-page > .hero {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: min(1540px, calc(100% - 72px));
  min-height: max(710px, calc(100svh - 88px));
  padding: 0;
  isolation: isolate;
}

#app .home-page > .hero > .hero-content {
  position: absolute;
  z-index: 4;
  top: 42%;
  left: 0;
  width: min(490px, 37%);
  transform: translateY(-50%);
}

#app .home-page .hero-content__eyebrow {
  margin-bottom: 30px;
  color: #1766d6;
  font-size: 13px;
  letter-spacing: .19em;
}

#app .home-page .hero-content__title {
  gap: 2px;
  color: #071e49;
  font-size: clamp(60px, 5.3vw, 88px);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.12;
  white-space: nowrap;
}

#app .home-page .hero-content__title span:last-child {
  background: linear-gradient(98deg, #075eea 0%, #0888ef 58%, #45b3e6 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

#app .home-page .hero-content__summary {
  max-width: 440px;
  margin-top: 32px;
  color: #58749a;
  font-size: 17px;
  line-height: 1.78;
}

#app .home-page .hero-content__actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 39px;
}

#app .home-page .hero-content__actions .button--primary {
  min-height: 58px;
  border-radius: 14px;
  background: linear-gradient(105deg, #0866e6, #168ff1);
  box-shadow: 0 13px 27px rgba(20, 106, 218, .2);
}

#app .home-page .ezen-optical-secondary {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid #9fc6fa;
  border-radius: 14px;
  background: rgba(255, 255, 255, .85);
  color: #0864d3;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

/* The bundled old visual stays invisible even if the enhancement script fails. */
#app .home-page > .hero > .hero-visual {
  position: absolute;
  z-index: 1;
  top: 46%;
  right: 0;
  display: block;
  width: 75%;
  height: auto;
  aspect-ratio: 1672 / 941;
  background: url('/assets/hero-optical-core.webp') center / contain no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
  transform: translateY(-50%);
  pointer-events: none;
}

#app .home-page > .hero > .hero-visual > *,
#app .home-page > .hero > .metric-cards,
#app .home-page > .hero > .hero-ambient {
  display: none !important;
}

#app .home-page > .hero.ezen-optical-mounted > .hero-visual { display: none !important; }

#app .home-page .ezen-optical-visual {
  position: absolute;
  z-index: 2;
  top: 46%;
  right: 0;
  display: block;
  width: 75%;
  margin: 0;
  aspect-ratio: 1672 / 941;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
  transform: translateY(-50%);
  pointer-events: none;
}

#app .home-page .ezen-optical-visual picture,
#app .home-page .ezen-optical-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
}

#app .home-page .ezen-optical-visual img { object-fit: contain; }

#app .home-page .ezen-optical-lens {
  position: absolute;
  z-index: 5;
  top: 12%;
  right: 1.5%;
  display: grid;
  grid-template-columns: 34px 1fr 14px;
  gap: 10px;
  width: 246px;
  min-height: 85px;
  align-items: start;
  padding: 17px;
  border: 1px solid rgba(172, 201, 234, .4);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 30px rgba(31, 80, 153, .07);
  color: #102c5b;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

#app .home-page .ezen-optical-lens__mark {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #e8f4ff;
  color: #1381ed;
  place-items: center;
  font-size: 20px;
}

#app .home-page .ezen-optical-lens strong,
#app .home-page .ezen-optical-lens small { display: block; }
#app .home-page .ezen-optical-lens strong { font-size: 16px; }
#app .home-page .ezen-optical-lens small { margin-top: 5px; color: #657d9f; font-size: 12px; line-height: 1.5; }
#app .home-page .ezen-optical-lens__arrow { color: #2785ef; font-size: 19px; }

/* P0 is intentionally static. */
#app .home-page > .hero *,
#app .home-page > .hero *::before,
#app .home-page > .hero *::after {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 1100px) {
  #app .home-page > .hero { width: calc(100% - 48px); min-height: max(620px, calc(100svh - 88px)); }
  #app .home-page > .hero > .hero-content { width: 42%; }
  #app .home-page .hero-content__title { font-size: clamp(50px, 5.8vw, 68px); }
  #app .home-page .hero-content__summary { font-size: 15px; }
  #app .home-page > .hero > .hero-visual,
  #app .home-page .ezen-optical-visual { width: 62%; }
  #app .home-page .ezen-optical-lens { top: 13%; right: 0; width: 230px; }
}

@media (max-width: 900px) {
  #app .home-page > .hero {
    width: calc(100% - 36px);
    min-height: 0;
    padding: 38px 0 34px;
  }
  #app .home-page > .hero > .hero-content {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    transform: none;
  }
  #app .home-page .hero-content__eyebrow { margin-bottom: 21px; font-size: 10px; letter-spacing: .14em; }
  #app .home-page .hero-content__title { gap: 0; font-size: clamp(42px, 11.5vw, 64px); line-height: 1.15; }
  #app .home-page .hero-content__summary { max-width: 560px; margin-top: 22px; font-size: 14px; line-height: 1.7; }
  #app .home-page .hero-content__actions { gap: 10px; margin-top: 24px; }
  #app .home-page .hero-content__actions .button--primary,
  #app .home-page .ezen-optical-secondary { min-height: 50px; font-size: 14px; }
  #app .home-page > .hero > .hero-visual,
  #app .home-page .ezen-optical-visual {
    position: relative;
    top: auto;
    right: auto;
    width: calc(100% + 36px);
    margin: 25px -18px 0;
    transform: none;
  }
  #app .home-page .ezen-optical-lens { display: none; }
}

/* Pre-rendered HTML remains visible when the SPA bundle is unavailable. */
#app > .ezen-optical-fallback {
  box-sizing: border-box;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(280px, 38%) 1fr;
  align-content: center;
  align-items: center;
  gap: 20px;
  padding: 5vw;
  background: #fbfdff;
  color: #071e49;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
#app > .ezen-optical-fallback h1 { margin: 0 0 22px; font-size: clamp(42px, 5vw, 82px); line-height: 1.13; }
#app > .ezen-optical-fallback h1 span { display: block; color: #0878ed; }
#app > .ezen-optical-fallback p { color: #58749a; line-height: 1.7; }
#app > .ezen-optical-fallback a { display: inline-block; margin: 18px 14px 0 0; color: #0866e6; }
#app > .ezen-optical-fallback img { display: block; width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: contain; }
#app > .ezen-optical-fallback picture {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
}
@media (max-width: 900px) {
  #app > .ezen-optical-fallback { display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 24px; }
  #app > .ezen-optical-fallback picture { width: calc(100% + 48px); margin-inline: -24px; flex: 0 0 auto; }
}

/* P2: the approved artwork is visible throughout its one-time entrance. */
@keyframes ezen-optical-enter {
  from { opacity: .94; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}

#app .home-page > .hero .ezen-optical-visual {
  animation: ezen-optical-enter 620ms cubic-bezier(.22, 1, .36, 1) both !important;
  transition: filter 300ms ease !important;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  #app .home-page > .hero:hover .ezen-optical-visual {
    filter: brightness(1.035) contrast(1.025);
    transition-duration: 420ms !important;
  }
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  #app .home-page > .hero .ezen-optical-visual {
    animation: none !important;
    transition: none !important;
    filter: none !important;
    translate: none;
    opacity: 1;
  }
  #app .home-page > .hero:hover .ezen-optical-visual {
    transition-duration: 0s !important;
  }
}

/* P3: the image is decorative, so double-clicking it must not select page text. */
#app .home-page > .hero .ezen-optical-visual,
#app .home-page > .hero .ezen-optical-visual picture,
#app .home-page > .hero .ezen-optical-visual img,
#app > .ezen-optical-fallback picture,
#app > .ezen-optical-fallback img {
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  #app .home-page > .hero:hover .ezen-optical-visual {
    filter: none;
    transition-duration: 300ms !important;
  }
  #app .home-page > .hero .ezen-optical-visual:hover {
    filter: brightness(1.035) contrast(1.025);
    transition-duration: 420ms !important;
  }
}

/* One continuous dot field crosses the Hero/technical-section boundary. */
#app .home-page > .hero::before,
#app .home-page > .yz-home-tech::before {
  position: absolute;
  left: 50%;
  width: 100vw;
  height: 250px;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background-image: url('/assets/home-seam-particles-v2.svg');
  background-repeat: no-repeat;
  background-size: 100% 500px;
  content: '';
  pointer-events: none;
  transform: translateX(-50%);
}

#app .home-page > .hero::before {
  z-index: 0;
  bottom: 0;
  background-position: center top;
}

#app .home-page > .yz-home-tech::before {
  z-index: 0;
  top: 0;
  background-position: center bottom;
}

#app .home-page > .yz-home-tech > .yz-home-tech__container {
  position: relative;
  z-index: 1;
}

#app .home-page > .app-header {
  background: rgba(249, 252, 255, .97);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
}

@media (max-width: 600px) {
  #app .home-page > .hero::before,
  #app .home-page > .yz-home-tech::before {
    height: 172px;
    background-size: 1100px 344px;
  }
}

@media (min-width: 601px) and (prefers-reduced-motion: no-preference) {
  #app .home-page .ezen-seam-pending {
    opacity: .78;
    translate: 0 18px;
    transition: opacity 620ms ease, translate 620ms cubic-bezier(.22, 1, .36, 1);
  }
  #app .home-page .ezen-seam-pending.ezen-seam-visible {
    opacity: 1;
    translate: 0 0;
  }
}

/* P4: bring the technical heading into the visual field while retaining a full-height Hero. */
#app .home-page > .yz-home-tech {
  padding-top: clamp(60px, 5.4vw, 76px);
  background:
    radial-gradient(ellipse 54% 170px at 50% 180px, rgba(129, 190, 252, .09), transparent 84%),
    linear-gradient(180deg, #fbfdff 0%, #f8fbff 24%, #fff 47%, #f6f9fe 100%);
}

@media (max-width: 600px) {
  #app .home-page > .yz-home-tech { padding-top: 58px; }
}

/* P5: a sparse crest drifts across the still particle field. */
#app .home-page > .hero::after,
#app .home-page > .yz-home-tech::after {
  position: absolute;
  z-index: 0;
  left: 50%;
  width: calc(100vw - 64px);
  height: 250px;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  background: url('/assets/home-particle-wave-p5.svg') center top / 100% 500px no-repeat;
  box-shadow: none;
  content: '';
  opacity: .82;
  pointer-events: none;
  transform: translateX(-50%);
}

#app .home-page > .hero::after { bottom: 0; }
#app .home-page > .yz-home-tech::after { top: 0; background-position: center bottom; }

@keyframes ezen-particle-wave {
  from { opacity: .68; transform: translateX(calc(-50% - 26px)); }
  to { opacity: 1; transform: translateX(calc(-50% + 26px)); }
}

@media (prefers-reduced-motion: no-preference) {
  #app .home-page.ezen-wave-active > .hero::after,
  #app .home-page.ezen-wave-active > .yz-home-tech::after {
    animation: ezen-particle-wave 8s ease-in-out infinite alternate;
  }
}

@media (max-width: 600px) {
  #app .home-page > .hero::after,
  #app .home-page > .yz-home-tech::after {
    width: calc(100vw - 64px);
    height: 172px;
    background-size: 1100px 344px;
  }
}

/* P6: pointer response stays behind the content and affects only the seam. */
#app .home-page > .hero::after,
#app .home-page > .yz-home-tech::after {
  translate: var(--ezen-wave-pointer-x, 0px) var(--ezen-wave-pointer-y, 0px);
  transition: translate 360ms cubic-bezier(.22, 1, .36, 1);
}

#app .home-page .ezen-particle-response {
  position: absolute;
  z-index: 0;
  left: 50%;
  display: block;
  width: 100vw;
  height: 250px;
  background-image:
    url('/assets/home-seam-particles-v2.svg'),
    radial-gradient(circle 170px at var(--ezen-pointer-x, -300px) var(--ezen-pointer-y, -300px), rgba(94, 169, 246, .15), transparent 75%);
  background-position: center top, center;
  background-size: 100% 500px, auto;
  background-repeat: no-repeat;
  filter: brightness(1.6) saturate(1.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 260ms ease;
  -webkit-mask-image: radial-gradient(circle 175px at var(--ezen-pointer-x, -300px) var(--ezen-pointer-y, -300px), #000 0%, rgba(0, 0, 0, .72) 46%, transparent 100%);
  mask-image: radial-gradient(circle 175px at var(--ezen-pointer-x, -300px) var(--ezen-pointer-y, -300px), #000 0%, rgba(0, 0, 0, .72) 46%, transparent 100%);
}

#app .home-page .ezen-particle-response.is-active { opacity: .96; }
#app .home-page > .hero > .ezen-particle-response { bottom: 0; }
#app .home-page > .yz-home-tech > .ezen-particle-response { top: 0; background-position: center bottom, center; }

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  #app .home-page .ezen-particle-response { display: none; }
  #app .home-page > .hero::after,
  #app .home-page > .yz-home-tech::after { translate: 0 0 !important; transition: none; }
}
