/* Use the visible viewport as the desktop chapter scale. */
@media (min-width:901px){
  #app .home-page > .hero{min-height:max(680px,calc(100svh - 88px))}
  #app .home-page > .hero > .hero-content{top:50%}
  #app .home-page .ezen-optical-visual,
  #app .home-page > .hero > .hero-visual{top:50%}
  #app .home-page > .cctv-feature,
  #app .home-page > .yz-home-tech{min-height:100svh;display:grid;align-content:center}
  #app .home-page > .yz-home-tech .yz-home-tech__grid{grid-auto-rows:clamp(236px,18.3vw,280px)}
  #app .home-page .updates-section,
  #app .home-page .demo-section,
  #app .home-page .access-section,
  #app .home-page .final-cta{min-height:100svh}
  #app .home-page .access-section,
  #app .home-page .scenarios-section,
  #app .home-page .final-cta{margin-top:0;border-radius:0}
}
@media (min-width:901px) and (max-width:1439px){
  #app .home-page > .hero{min-height:max(684px,calc(100svh - 84px))}
}

/* The closing chapter follows the selected theme. The footer itself is
   width-constrained, so its background must stay transparent. */
#app .home-page .final-cta{background:#fff!important}
#app .home-page .final-cta .final-manifesto__title-art{filter:none}
#app .home-page .final-cta .story-eyebrow{color:#4385cd!important}
#app .home-page .final-cta .story-shell > p:not(.story-eyebrow){color:#75849f}
#app .home-page .final-cta .story-shell > div a:not(.final-cta__primary){color:#17365e;border-color:#b8c9e4}
#app .home-page .site-footer{background:transparent!important}
html[data-theme="dark"] #app .home-page .final-cta{background:#081425!important}
html[data-theme="dark"] #app .home-page .final-cta .final-manifesto__title-art{filter:brightness(1.55) saturate(1.08)}
html[data-theme="dark"] #app .home-page .final-cta .story-eyebrow{color:#94c9ff!important}
html[data-theme="dark"] #app .home-page .final-cta .story-shell > p:not(.story-eyebrow){color:#b9cce3}
html[data-theme="dark"] #app .home-page .final-cta .story-shell > div a:not(.final-cta__primary){color:#e4f1ff;border-color:#8fb6e3}

@media (max-width:900px){
  #app .home-page > .hero{
    display:flex;flex-direction:column;justify-content:center;
    min-height:calc(100svh - 80px);
  }
  #app .home-page > .cctv-feature{min-height:100svh}
  #app .home-page .final-cta{margin-top:0;border-radius:0}
}
@media (max-width:600px){
  #app .home-page > .hero{min-height:calc(100svh - 70px)}
  #app .home-page > .yz-home-tech .yz-home-tech__grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-rows:minmax(168px,auto);gap:10px;
  }
  #app .home-page > .yz-home-tech .yz-home-tech-card--wide,
  #app .home-page > .yz-home-tech .yz-home-tech-card--narrow,
  #app .home-page > .yz-home-tech .yz-home-tech-card--half{grid-column:span 1}
  #app .home-page > .yz-home-tech .yz-home-tech-card__copy,
  #app .home-page > .yz-home-tech .yz-home-tech-card--narrow .yz-home-tech-card__copy,
  #app .home-page > .yz-home-tech .yz-home-tech-card--engine .yz-home-tech-card__copy{max-width:100%;padding:13px 12px 16px}
  #app .home-page > .yz-home-tech .yz-home-tech-card__metric{font-size:clamp(32px,8.7vw,40px)}
  #app .home-page > .yz-home-tech .yz-home-tech-card__title{font-size:13px;line-height:1.25}
  #app .home-page > .yz-home-tech .yz-home-tech-card__product{font-size:clamp(21px,6.5vw,28px)}
  #app .home-page > .yz-home-tech .yz-home-tech-card--architecture .yz-home-tech-card__metric{font-size:clamp(21px,6.5vw,28px)}
  #app .home-page > .yz-home-tech .yz-home-tech-card__kicker{font-size:8px;line-height:1.25}
  #app .home-page > .yz-home-tech .yz-home-tech-card__art{opacity:.55}
}
@media (max-width:600px) and (max-height:700px){
  #app .home-page > .hero{padding:20px 0 18px}
  #app .home-page .hero-content__eyebrow{margin-bottom:11px}
  #app .home-page .hero-content__title{font-size:clamp(36px,11vw,42px);line-height:1.08}
  #app .home-page .hero-content__summary{margin-top:12px;font-size:13px;line-height:1.55}
  #app .home-page .hero-content__actions{margin-top:14px}
  #app .home-page .hero-content__actions .button--primary,
  #app .home-page .ezen-optical-secondary{min-height:44px;padding-top:8px;padding-bottom:8px;font-size:13px}
  #app .home-page .ezen-optical-visual{width:min(100%,280px);margin:12px auto 0}
}

/* Preserve the same multimodal hero artwork in both themes. In dark mode
   the SVG color matrix fades near-white pixels while retaining blue detail. */
html[data-theme="dark"] #app .home-page > .hero .ezen-optical-visual,
html[data-theme="dark"] #app .home-page > .hero > .hero-visual{
  -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%);
  filter:none!important;
}
html[data-theme="dark"] #app .home-page > .hero .ezen-optical-visual{background:none}
html[data-theme="dark"] #app .home-page > .hero .ezen-optical-visual picture{visibility:visible}
html[data-theme="dark"] #app .home-page > .hero .ezen-optical-visual img{filter:url('/assets/hero-optical-dark-matte-v1.svg#chroma2')}
html[data-theme="dark"] #app .home-page > .hero > .hero-visual{background:url('/assets/hero-optical-core.webp') center / contain no-repeat;filter:url('/assets/hero-optical-dark-matte-v1.svg#chroma2')!important}
