/*
 * SORA mobile application layer
 * Bottom navigation, compact footer and safe-area handling.
 */
.footer-mobile-hub{display:none}

@media(max-width:767px){
  :root{--mobile-dock-h:82px}
  html{scroll-padding-bottom:calc(var(--mobile-dock-h) + env(safe-area-inset-bottom))}
  body,
  body:not(.page-start-project){
    padding-bottom:calc(var(--mobile-dock-h) + 12px + env(safe-area-inset-bottom))!important;
  }

  /* Header feels like an application toolbar. */
  .site-header{
    background:rgba(11,14,16,.94)!important;
    border-bottom:1px solid rgba(255,255,255,.1)!important;
    box-shadow:0 8px 30px rgba(0,0,0,.12);
    -webkit-backdrop-filter:blur(18px);
    backdrop-filter:blur(18px);
  }
  .site-header .brand{min-width:48px!important;min-height:48px!important}
  .site-header .menu-button{
    width:46px!important;height:46px!important;border-color:rgba(255,255,255,.22)!important;
    background:rgba(255,255,255,.025);
  }
  body.menu-open{padding-bottom:0!important}

  /* Compact, layered mobile footer. */
  .site-footer{padding:54px 0 0!important}
  .site-footer .footer-grid{display:block!important}
  .site-footer .footer-brand{padding:0!important}
  .site-footer .footer-brand>img{width:112px!important;height:auto!important;margin-bottom:24px}
  .site-footer .footer-brand>p{max-width:31ch;margin-bottom:28px!important;font-size:13px!important;line-height:1.6}
  .site-footer .footer-phone{
    width:100%!important;min-height:88px!important;margin:0!important;padding:18px!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) 42px!important;
    border:1px solid rgba(255,255,255,.16)!important;background:rgba(255,255,255,.025);
  }
  .site-footer .footer-phone small{font-size:8px!important;letter-spacing:.15em!important}
  .site-footer .footer-phone span{font-size:24px!important;line-height:1!important}
  .site-footer .footer-phone b{
    width:42px!important;height:42px!important;display:grid!important;place-items:center;
    border:1px solid rgba(200,212,0,.45);color:var(--accent);
  }
  .site-footer .footer-social{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;
    margin:16px 0 34px!important;
  }
  .site-footer .footer-social a{
    min-width:0!important;min-height:48px!important;padding:0 8px!important;justify-content:center;
    border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.02);
    font-size:9px!important;letter-spacing:.08em!important;
  }
  .site-footer .footer-social svg{width:15px;height:15px}
  .site-footer .footer-nav-group,
  .site-footer .footer-contact,
  .site-footer .footer-project{display:none!important}

  .footer-mobile-hub{
    display:block!important;margin-top:8px!important;
    border-top:1px solid rgba(255,255,255,.14);
  }
  .footer-mobile-hub details{border-bottom:1px solid rgba(255,255,255,.14)}
  .footer-mobile-hub summary{
    min-height:64px;padding:0 2px;display:flex;align-items:center;justify-content:space-between;
    color:#f5f4ef;font-size:12px;font-weight:750;letter-spacing:.1em;text-transform:uppercase;
    cursor:pointer;list-style:none;
  }
  .footer-mobile-hub summary::-webkit-details-marker{display:none}
  .footer-mobile-hub summary svg{
    width:20px;height:20px;fill:none;stroke:var(--accent);stroke-width:1.5;
    transition:transform .24s var(--ease);
  }
  .footer-mobile-hub details[open] summary svg{transform:rotate(180deg)}
  .footer-mobile-hub details>div{
    display:grid;grid-template-columns:1fr;padding:0 0 18px;
  }
  .footer-mobile-hub details a{
    min-height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;
    color:#aeb5b0;text-decoration:none;border-left:1px solid rgba(200,212,0,.35);
    font-size:13px;
  }
  .footer-mobile-hub details a::after{content:"→";color:var(--accent)}

  .site-footer .footer-bottom{
    margin-top:28px!important;padding:0 0 22px!important;border-top:0!important;
    display:grid!important;grid-template-columns:1fr!important;
  }
  .site-footer .footer-bottom__identity{
    min-height:58px!important;padding:0!important;display:flex!important;justify-content:space-between!important;
    border-bottom:1px solid rgba(255,255,255,.12);
  }
  .site-footer .footer-bottom nav{
    min-height:58px;padding:6px 0!important;display:flex!important;align-items:center!important;
    gap:12px!important;border-bottom:1px solid rgba(255,255,255,.12);
  }
  .site-footer .footer-bottom nav>span{margin-right:auto}
  .site-footer .footer-bottom nav a{min-width:auto!important;padding:0 4px!important}
  .site-footer .footer-bottom__meta{
    min-height:62px!important;padding:0!important;display:flex!important;justify-content:space-between!important;
  }
  .site-footer .back-to-top{min-height:46px!important}

  /* Five-item application dock. */
  .mobile-cta,
  .page-start-project .mobile-cta{
    position:fixed!important;z-index:90!important;
    left:8px!important;right:8px!important;bottom:8px!important;
    width:auto!important;min-height:74px!important;
    padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:2px!important;
    border:1px solid rgba(255,255,255,.14)!important;border-radius:20px!important;
    background:rgba(8,11,13,.94)!important;
    box-shadow:0 18px 52px rgba(0,0,0,.42),0 0 0 1px rgba(0,0,0,.3)!important;
    -webkit-backdrop-filter:blur(24px) saturate(1.1);
    backdrop-filter:blur(24px) saturate(1.1);
  }
  body.menu-open .mobile-cta{display:none!important}
  .mobile-dock__item{
    position:relative;min-width:0!important;min-height:60px!important;padding:7px 2px 5px!important;
    display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px!important;
    color:#89918c!important;text-decoration:none;border:0!important;border-radius:14px!important;
    background:transparent!important;font-size:0!important;transition:color .2s,background .2s,transform .2s;
  }
  .mobile-dock__item>svg{
    display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;
    stroke-linecap:round;stroke-linejoin:round;flex:0 0 21px;
  }
  .mobile-dock__item>span{
    display:block;max-width:100%;font-size:8px!important;font-weight:750;line-height:1;
    letter-spacing:.02em;white-space:nowrap;text-transform:none;
  }
  .mobile-dock__item.is-current{
    color:var(--accent)!important;background:rgba(200,212,0,.075)!important;
  }
  .mobile-dock__item.is-current::after{
    content:"";position:absolute;left:50%;top:3px;width:18px;height:2px;
    background:var(--accent);border-radius:999px;transform:translateX(-50%);
  }
  .mobile-dock__item--primary{color:#0b0e10!important}
  .mobile-dock__item--primary>i{
    width:43px;height:43px;margin-top:-22px;display:grid;place-items:center;
    border-radius:15px;background:var(--accent);color:var(--ink);font-style:normal;
    border:3px solid #0a0d0f;box-shadow:0 8px 22px rgba(0,0,0,.35);
  }
  .mobile-dock__item--primary>i svg{
    width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;
  }
  .mobile-dock__item--primary>i img{
    width:auto;height:23px;max-width:26px;object-fit:contain;display:block;
  }
  .mobile-dock__item--primary>span{color:#d9ddd9}
  .mobile-dock__item--primary.is-current>i{background:#fff}
  .mobile-dock__item--primary.is-current::after{display:none}
  .mobile-dock__item--whatsapp>svg{fill:currentColor;stroke:none;color:#aeb5b0}
  .mobile-dock__item--whatsapp:active,
  .mobile-dock__item:active{transform:scale(.94)}

  /* Footer and dock never fight for the same visual layer. */
  .site-footer{margin-bottom:0!important}
  .signature-close{scroll-margin-bottom:calc(var(--mobile-dock-h) + 20px)}
}

@media(max-width:360px){
  .mobile-cta,.page-start-project .mobile-cta{left:5px!important;right:5px!important;bottom:5px!important}
  .mobile-dock__item>span{font-size:7px!important}
  .site-footer .footer-social a{font-size:8px!important;padding-inline:4px!important}
}

@media(min-width:768px){
  .mobile-cta{display:none!important}
  .footer-mobile-hub{display:none!important}
}
