/* ARCHIETALIC PERFORMANCE CLEANUP v1.0
   Safe optimization layer. Does not redesign sections.
   Goal: smoother mobile, no horizontal scroll, less animation cost.
*/

html, body{
  max-width:100%!important;
  overflow-x:hidden!important;
}

img, video, canvas, svg{
  max-width:100%;
  height:auto;
}

body{
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Reduce expensive hover effects on touch devices */
@media (hover:none){
  .case-study:hover,
  .template:hover,
  .feature:hover,
  .contact-card:hover,
  .big-card:hover,
  .step:hover,
  .arch-tech-badge:hover,
  .arch-footer-v3-socials a:hover{
    transform:none!important;
  }
}

/* Keep heavy decorative layers behind everything */
.site-bg,
.aurora,
.grid,
.wave,
.mouse-glow{
  pointer-events:none!important;
}

/* Prevent rogue elements from creating side scroll */
.wrap,
.nav-inner,
.arch-footer-v3-wrap,
.arch-polish-wrap,
.arch-founder-v2,
.arch-founder-wrap,
.arch-ai-widget,
.ai-receptionist-widget{
  max-width:100%!important;
}

/* Improve mobile scroll smoothness */
@media(max-width:760px){
  .aurora{
    opacity:.38!important;
    filter:blur(32px)!important;
  }

  .grid{
    opacity:.26!important;
  }

  .wave{
    opacity:.32!important;
    filter:blur(30px)!important;
  }

  .ai-card,
  .case-study,
  .template,
  .arch-footer-pro,
  .arch-polish-section{
    will-change:auto!important;
  }
}

/* Lazy image polish */
img[data-arch-lazy="1"]{
  background:rgba(255,255,255,.04);
}

/* Prevent sticky/fixed UI from creating overflow */
.arch-drawer-final,
.arch-mega-final,
.arch-ai-widget,
.ai-receptionist-widget,
.backtop{
  max-width:100vw!important;
}

/* Mobile bottom spacing for floating AI + back button */
@media(max-width:620px){
  main{
    overflow:hidden!important;
  }

  section{
    overflow:hidden!important;
  }

  .footer,
  .arch-footer-pro{
    padding-bottom:110px!important;
  }
}

/* Reduced motion mode */
@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
}

/* ==========================================================
   ARCHIETALIC LOGO LAZY FIX
   Keeps header/footer logo plain and aligned.
   Added by cleanup fix.
   ========================================================== */
.brand-logo,
.footer-logo,
.arch-footer-v2-logo,
.arch-footer-v3-logo,
.ap-logo,
.ap-footer img,
.site-header .brand-logo,
.static-header .brand-logo,
.nav .brand-logo,
.arch-footer-pro img,
footer img[data-arch-lazy],
img[data-arch-lazy="0"]{
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

img[data-arch-lazy="1"]{
  background: transparent !important;
}
