/* Prestige Coding & Technology — Phase 2 Responsive & Motion System */
:root{
  --p2-header-h:82px;
  --p2-ease:cubic-bezier(.22,.8,.25,1);
  --p2-fast:220ms;
  --p2-med:520ms;
  --p2-shadow:0 24px 70px rgba(4,25,55,.16);
}
*{min-width:0}
html{scroll-padding-top:calc(var(--p2-header-h) + 20px)}
body{overscroll-behavior-y:none}
img,video,iframe,svg{max-width:100%}
img{height:auto}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
.skip-link{position:fixed;left:16px;top:12px;z-index:99999;transform:translateY(-160%);padding:.8rem 1rem;border-radius:12px;background:#fff;color:#07111f;font-weight:800;box-shadow:var(--p2-shadow);transition:transform var(--p2-fast) ease}.skip-link:focus{transform:none}

/* Stable header and navigation */
.header{will-change:transform}.header .nav{position:relative}
.nav-toggle{touch-action:manipulation}
.nav-toggle:focus-visible,.prestige-menu a:focus-visible,.nav-dropbtn:focus-visible,.btn:focus-visible{outline:3px solid rgba(0,183,255,.48)!important;outline-offset:3px!important}
.nav-dropdown-menu{transform-origin:top center}
@media (min-width:1024px){
  .prestige-menu{display:flex!important;position:static!important;transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;max-height:none!important;overflow:visible!important}
  .nav-toggle,.mobile-menu-overlay{display:none!important}
  .nav-dropdown{position:relative}
  .nav-dropdown-menu{display:block!important;position:absolute!important;top:calc(100% + 12px)!important;left:50%!important;min-width:260px!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translate(-50%,-8px) scale(.98)!important;transition:opacity var(--p2-fast) ease,transform var(--p2-fast) var(--p2-ease),visibility var(--p2-fast) ease!important}
  .nav-dropdown:hover .nav-dropdown-menu,.nav-dropdown:focus-within .nav-dropdown-menu,.nav-dropdown.is-open .nav-dropdown-menu{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:translate(-50%,0) scale(1)!important}
}

/* More reliable responsive grids */
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(24px,4vw,56px)}
.grid-3,.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(18px,2.4vw,30px)}
.grid-4,.home-services-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(18px,2.1vw,28px)}
.footer-grid{display:grid;grid-template-columns:1.3fr .8fr 1fr 1fr}
.card,.service-pro-card,.course-card,.project-card,.blog-card{height:100%}
.course-card,.service-pro-card,.project-card,.blog-card{display:flex;flex-direction:column}.course-body,.card-body{display:flex;flex-direction:column;flex:1}.course-body .btn,.card-body .btn{margin-top:auto;align-self:flex-start}

/* Motion hierarchy */
[data-p2-reveal]{opacity:0;transform:translate3d(0,30px,0) scale(.985);filter:blur(3px);transition:opacity .75s ease,transform .75s var(--p2-ease),filter .75s ease;transition-delay:var(--p2-delay,0ms)}
[data-p2-reveal].p2-visible{opacity:1;transform:none;filter:none}
.p2-hero-ready .hero h1,.p2-hero-ready .hero p,.p2-hero-ready .hero .btn,.p2-hero-ready .px-hero h1,.p2-hero-ready .px-hero p,.p2-hero-ready .px-hero .btn{animation:p2HeroIn .85s var(--p2-ease) both}
.p2-hero-ready .hero p,.p2-hero-ready .px-hero p{animation-delay:.08s}.p2-hero-ready .hero .btn,.p2-hero-ready .px-hero .btn{animation-delay:.16s}
@keyframes p2HeroIn{from{opacity:0;transform:translateY(26px);filter:blur(5px)}to{opacity:1;transform:none;filter:none}}

/* Premium cursor and hover behavior only on capable devices */
@media (hover:hover) and (pointer:fine){
  .p2-tilt{transform-style:preserve-3d;will-change:transform;transition:transform .22s var(--p2-ease),box-shadow .3s ease!important}
  .p2-tilt:hover{box-shadow:0 34px 86px rgba(7,36,78,.19)!important}
  .btn{position:relative;overflow:hidden}.btn::before{content:"";position:absolute;inset:-40%;background:linear-gradient(110deg,transparent 35%,rgba(255,255,255,.28) 48%,transparent 61%);transform:translateX(-70%) rotate(8deg);transition:transform .7s var(--p2-ease);pointer-events:none}.btn:hover::before{transform:translateX(70%) rotate(8deg)}
}

/* Sticky mobile conversion bar and safe areas */
.whatsapp-dock{bottom:max(16px,env(safe-area-inset-bottom))!important;right:max(14px,env(safe-area-inset-right))!important;z-index:900}
.p2-backtop{position:fixed;right:20px;bottom:96px;width:46px;height:46px;border:0;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#0b5cff,#6d4aff);color:#fff;box-shadow:0 16px 36px rgba(30,70,190,.32);opacity:0;visibility:hidden;transform:translateY(12px);transition:.25s ease;z-index:850;cursor:pointer}.p2-backtop.is-visible{opacity:1;visibility:visible;transform:none}.p2-backtop:hover{transform:translateY(-3px)}

/* Tablet */
@media (max-width:1199px){
  .grid-4,.home-services-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hero h1,.hero-slide h1,.px-hero h1{max-width:850px}
}
@media (max-width:1023px){
  :root{--p2-header-h:72px}
  body.menu-open{overflow:hidden!important;touch-action:none}
  .nav-toggle{display:inline-grid!important;place-items:center;width:46px;height:46px;border:1px solid rgba(7,36,74,.1);border-radius:14px;background:#fff;color:#071a33;box-shadow:0 10px 26px rgba(7,32,65,.1);z-index:1003}
  .prestige-menu{position:fixed!important;top:0!important;right:0!important;width:min(88vw,390px)!important;height:100dvh!important;padding:96px 20px 28px!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;background:rgba(255,255,255,.98)!important;box-shadow:-28px 0 70px rgba(4,24,53,.18)!important;transform:translateX(105%)!important;opacity:1!important;visibility:visible!important;transition:transform .38s var(--p2-ease)!important;overflow-y:auto!important;z-index:1002!important}
  body.menu-open .prestige-menu{transform:none!important}
  .prestige-menu>a,.nav-dropbtn{min-height:48px!important;font-size:1rem!important;padding:13px 14px!important}
  .mobile-menu-overlay{display:block;position:fixed;inset:0;background:rgba(3,13,28,.52);backdrop-filter:blur(5px);opacity:0;visibility:hidden;transition:.28s ease;z-index:1001}
  body.menu-open .mobile-menu-overlay{opacity:1;visibility:visible}
  .nav-dropdown-menu{position:static!important;display:grid!important;grid-template-rows:0fr!important;opacity:1!important;visibility:visible!important;transform:none!important;padding:0 8px!important;border:0!important;box-shadow:none!important;background:#f5f8ff!important;overflow:hidden!important;transition:grid-template-rows .3s var(--p2-ease),padding .3s ease!important}
  .nav-dropdown-menu>*{overflow:hidden}.nav-dropdown.is-open .nav-dropdown-menu{grid-template-rows:1fr!important;padding:8px!important}
  .nav-dropdown-menu a{min-height:44px;display:flex;align-items:center}
  .grid-3,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .corporate-box{grid-template-columns:1fr!important}
}

/* Mobile */
@media (max-width:767px){
  .container{width:min(calc(100% - 28px),var(--p1-max))!important}
  .grid-2,.grid-3,.grid-4,.stats-grid,.home-services-grid,.footer-grid{grid-template-columns:1fr!important}
  .section{padding:60px 0!important}.section-title,.head{margin-bottom:30px!important}
  .hero,.hero-slide,.px-hero{min-height:auto!important;padding:96px 0 64px!important;text-align:left}
  .hero h1,.hero-slide h1,.px-hero h1{font-size:clamp(2.25rem,12vw,3.4rem)!important;line-height:1!important}
  .hero-actions,.px-hero-actions,.home-services-cta{display:grid!important;grid-template-columns:1fr!important;gap:11px!important}.hero-actions .btn,.px-hero-actions .btn,.home-services-cta .btn{width:100%!important}
  .card,.service-pro-card,.course-card,.project-card,.blog-card{border-radius:20px!important}
  .footer{padding-bottom:110px!important}.footer-grid{gap:34px!important}.footer a{display:block;margin:.35rem 0}
  .whatsapp-dock{left:14px!important;right:14px!important;bottom:max(12px,env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:1fr 1fr!important;width:auto!important}.whatsapp-dock a{justify-content:center!important;min-height:52px!important}
  .p2-backtop{right:16px;bottom:86px;width:42px;height:42px}
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
}
@media (max-width:380px){.brand small{display:none}.brand strong{font-size:.82rem}.container{width:min(calc(100% - 20px),var(--p1-max))!important}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}[data-p2-reveal]{opacity:1!important;transform:none!important;filter:none!important}}
