/* CerberHost 72.1.464 R7 — Header + Footer + Mobile Polish (SAFE/UI only) */
:root{
  --ch-r7-purple:#c747ff;
  --ch-r7-purple-2:#8f24d6;
  --ch-r7-line:rgba(199,71,255,.22);
  --ch-r7-panel:rgba(10,3,14,.84);
}

/* ===== HEADER ===== */
.site-header{
  position:sticky!important;
  top:0!important;
  z-index:90!important;
  border-bottom:1px solid rgba(194,70,246,.14)!important;
  background:linear-gradient(180deg,rgba(6,1,9,.94),rgba(7,1,11,.82))!important;
  backdrop-filter:blur(16px) saturate(1.1)!important;
  -webkit-backdrop-filter:blur(16px) saturate(1.1)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.18)!important;
  transition:box-shadow .22s ease,border-color .22s ease,background .22s ease!important;
}
.site-header.ch-r7-scrolled{
  border-bottom-color:rgba(207,83,255,.28)!important;
  background:rgba(6,1,9,.96)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.38),0 0 28px rgba(126,24,177,.08)!important;
}
.site-header .wordmark,
.site-header .logo,
.site-header .brand{
  transition:transform .2s ease,filter .2s ease!important;
}
.site-header .wordmark:hover,
.site-header .logo:hover,
.site-header .brand:hover{
  transform:translateY(-1px)!important;
  filter:drop-shadow(0 0 12px rgba(201,75,255,.28))!important;
}
.site-header nav a,
.site-header .login-link,
.site-header .header-action{
  position:relative!important;
  transition:color .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
.site-header nav a::after{
  content:"";
  position:absolute;
  left:18%;right:18%;bottom:-7px;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,#cf51ff,transparent);
  transform:scaleX(0);
  opacity:0;
  transition:transform .2s ease,opacity .2s ease;
}
.site-header nav a:hover::after,
.site-header nav a.active::after{
  transform:scaleX(1);
  opacity:1;
}
.site-header nav a:hover,
.site-header .login-link:hover,
.site-header .header-action:hover{
  transform:translateY(-1px)!important;
  text-shadow:0 0 10px rgba(222,108,255,.22)!important;
}
.site-header .header-action{
  box-shadow:0 0 0 1px rgba(221,101,255,.05),0 0 18px rgba(151,37,207,.08)!important;
}
.site-header .header-action:hover{
  box-shadow:0 0 0 1px rgba(221,101,255,.15),0 0 24px rgba(170,46,230,.18)!important;
}

/* ===== GLOBAL SECTION RHYTHM ===== */
main > section,
body > main > section,
.section,
.network-section,
.config-section,
#ch464-home-plus{
  scroll-margin-top:92px;
}
.section-head h2,
.ch464-head h2{
  text-wrap:balance;
}

/* ===== FOOTER ===== */
footer,
.site-footer,
.legal-footer{
  position:relative;
  overflow:hidden;
  border-top:1px solid rgba(190,67,242,.18)!important;
  background:
    radial-gradient(circle at 12% 100%,rgba(146,31,197,.12),transparent 28%),
    linear-gradient(180deg,rgba(6,1,9,.92),#030105)!important;
}
footer::before,
.site-footer::before,
.legal-footer::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(100deg,transparent 0%,rgba(210,99,255,.025) 48%,transparent 62%);
}
footer a,
.site-footer a,
.legal-footer a{
  transition:color .18s ease,text-shadow .18s ease,transform .18s ease!important;
}
footer a:hover,
.site-footer a:hover,
.legal-footer a:hover{
  color:#e896ff!important;
  text-shadow:0 0 10px rgba(208,90,255,.22)!important;
}

/* ===== MOBILE / TABLET ===== */
@media(max-width:1100px){
  .site-header{
    min-height:64px!important;
  }
  .site-header nav{
    gap:4px!important;
  }
  .main-banner-hero,
  .network-section,
  .config-shell,
  #ch464-home-plus .ch464-wrap{
    border-radius:16px!important;
  }
}

@media(max-width:820px){
  html,body{overflow-x:hidden!important}
  .site-header{
    position:sticky!important;
    top:0!important;
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(12px,env(safe-area-inset-right))!important;
  }
  .site-header nav{
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .site-header nav::-webkit-scrollbar{display:none!important}
  .site-header nav a,
  .login-link,
  .header-action{
    min-height:40px!important;
    display:inline-flex!important;
    align-items:center!important;
    white-space:nowrap!important;
  }
  .main-banner-hero{
    min-height:unset!important;
  }
  .main-banner-hero img{
    max-height:400px!important;
    object-fit:cover!important;
  }
  .service-grid,
  .infra-grid,
  .choice-grid,
  .addon-grid,
  #ch464-home-plus .ch464-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .config-shell{
    grid-template-columns:1fr!important;
  }
  .summary-card{
    position:static!important;
    top:auto!important;
  }
}

@media(max-width:600px){
  .site-header{
    min-height:58px!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
  }
  .site-header .wordmark .word,
  .site-header .wordmark strong{
    font-size:clamp(16px,5vw,21px)!important;
  }
  .site-header nav a,
  .login-link,
  .header-action{
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:9px!important;
    font-size:12px!important;
  }
  .main-banner-hero,
  .network-section,
  .config-section,
  #ch464-home-plus{
    margin-left:10px!important;
    margin-right:10px!important;
  }
  .service-grid,
  .infra-grid,
  .choice-grid,
  .addon-grid,
  #ch464-home-plus .ch464-grid,
  #ch464-home-plus .ch464-steps{
    grid-template-columns:1fr!important;
  }
  .service-card,
  #ch464-home-plus .ch464-card{
    min-height:unset!important;
  }
  .section-head,
  .ch464-head{
    align-items:flex-start!important;
    gap:12px!important;
  }
  .ch464-migration{
    grid-template-columns:1fr!important;
    padding:18px!important;
  }
  .ch464-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .ch464-btn,
  .primary,
  .header-action{
    justify-content:center!important;
  }
  footer,
  .site-footer,
  .legal-footer{
    padding-left:max(14px,env(safe-area-inset-left))!important;
    padding-right:max(14px,env(safe-area-inset-right))!important;
    padding-bottom:max(18px,env(safe-area-inset-bottom))!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .site-header,
  .site-header *,
  footer *,
  .site-footer *{
    transition:none!important;
    animation:none!important;
  }
}
