/* Homepage mobile refinement — intentionally scoped below the approved desktop breakpoint. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.footer-back-to-top{display:none}

@media (max-width:800px){
  :root{--mobile-rail:20px}
  /* Surface real mobile overflow instead of masking it at the page level. */
  body.homepage{overflow-x:visible}
  .wrap{width:min(calc(100% - (var(--mobile-rail) * 2)),1120px)}
  .hero-grid,.split,.detail,.contact-grid,.login-panel{min-width:0}
  body.homepage main>.section:not(.ecosystem-hero){padding-block:clamp(64px,16vw,80px)}

  /* Keep the approved hero, but make its actions read as a clear primary/secondary pair. */
  .ecosystem-hero{padding-block:32px 22px;overflow-x:clip}
  .ecosystem-hero .actions{align-items:flex-start;flex-direction:column;gap:12px}
  .ecosystem-hero .button.primary{min-height:48px}
  .ecosystem-hero .button.ghost{min-height:44px;padding:10px 0;background:transparent;color:var(--blue);box-shadow:none}
  .ecosystem-hero .hero-showcase,.ecosystem-hero .approved-device-showcase,.ecosystem-hero .approved-device-showcase img{min-width:0;max-width:100%}
  body.homepage main .ecosystem-hero .approved-device-showcase{animation:mobile-showcase-in .58s .38s cubic-bezier(.22,1,.36,1) both}

  .brand-philosophy .split{gap:22px}
  .philosophy-row{gap:16px}
  .philosophy-row span{font-size:.82rem;line-height:1.45}

  /* Finance principles remain a readable vertical sequence on phones. */
  .editorial-features{grid-template-columns:1fr}
  .editorial-features article,.editorial-features article:nth-child(3),.editorial-features article:nth-child(even){border-right:0}
  .editorial-features article{min-height:0;padding:20px;border-top:1px solid var(--line)}
  .editorial-features article:first-child{border-top:0}
  .editorial-features article:last-child{grid-column:auto}
  .editorial-features p{font-size:.9rem}

  /* Care by Design becomes one full-width, deliberately paced column. */
  body.homepage .trust-section{padding-top:0!important;padding-bottom:clamp(64px,16vw,80px)!important}
  body.homepage main .trust-section>.split{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:clamp(34px,10vw,44px);align-items:start}
  body.homepage main .trust-section>.split>.trust-panel,body.homepage main .trust-section>.split>.quote{width:100%;max-width:none;min-width:0;grid-column:auto}
  body.homepage .trust-section .trust-panel{min-height:0;padding:clamp(20px,6vw,24px);border-radius:24px}
  body.homepage .trust-panel h2{max-width:none;overflow:visible;white-space:normal;overflow-wrap:normal;font-size:clamp(2rem,8.5vw,2.4rem)}
  body.homepage .trust-panel p{max-width:38ch;font-size:1rem;line-height:1.6}
  body.homepage .secure-list{margin-top:27px;gap:14px}
  body.homepage .secure-list div{align-items:flex-start;font-size:.94rem;line-height:1.45}
  body.homepage .check{flex:0 0 25px;margin-top:1px}
  body.homepage .trust-section .quote{padding:0}
  body.homepage .quote h2,body.homepage .trust-section .quote h2{font-size:clamp(2rem,8vw,2.45rem);max-width:18ch}
  body.homepage .quote p,body.homepage .trust-section .quote p{font-size:1rem;line-height:1.6;margin:16px 0 24px}
  body.homepage .security-links{gap:12px}
  body.homepage .security-link{min-height:44px;padding:10px 14px}

  /* The final CTA follows the mobile reading order and keeps a generous target. */
  body.homepage main>.cta{width:min(calc(100% - (var(--mobile-rail) * 2)),1120px);margin-bottom:64px;padding:28px 22px;display:grid;grid-template-columns:1fr;justify-items:stretch;gap:22px}
  body.homepage main>.cta h2{max-width:18ch}
  body.homepage .final-cta-button{width:100%;min-height:48px;white-space:normal}

  /* A single-column footer avoids compressed desktop-style link groups. */
  body.homepage .site-footer{padding:36px 0 max(30px,calc(18px + env(safe-area-inset-bottom)));color:#62718d;font-size:.9rem}
  body.homepage .site-footer .footer-row{gap:24px;align-items:stretch}
  body.homepage .footer-brand-block p{margin:9px 0 0;color:#5c6d89;font-size:.86rem;line-height:1.55}
  body.homepage .site-footer .footer-groups{width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px!important;padding-top:0}
  body.homepage .site-footer .footer-groups span{gap:4px;min-width:0}
  body.homepage .site-footer .footer-groups b{margin-bottom:4px;color:#243b61;font-size:.75rem;letter-spacing:.08em}
  body.homepage .site-footer .footer-groups a,body.homepage .site-footer .footer-groups em{font-size:.9rem;line-height:1.45}
  body.homepage .site-footer .footer-groups a{min-height:40px;align-items:center;color:#354a6f}
  body.homepage .site-footer .footer-groups em{color:#687793}
  body.homepage .site-footer .footer-row>span.footer-meta:last-child{display:flex;width:100%;align-items:center;justify-content:space-between;gap:16px;margin-left:0;padding-top:18px;border-top:1px solid var(--line);color:#71809a;font-size:.8rem}
  body.homepage .footer-back-to-top{display:inline-flex;align-items:center;justify-content:center;min-height:40px;color:#52647f;font-size:.8rem;font-weight:650}
  body.homepage .footer-back-to-top:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:4px}
}

@media (max-width:375px){
  body.homepage .ecosystem-hero .button.primary{width:100%}
  body.homepage .security-links{align-items:stretch;flex-direction:column}
  body.homepage .security-link{width:100%;justify-content:space-between}
}

@media (max-width:340px){
  :root{--mobile-rail:14px}
  .ecosystem-hero{padding-top:28px}
  body.homepage .trust-section .trust-panel{padding:20px}
  body.homepage main>.cta{padding:24px 20px}
  body.homepage .site-footer .footer-groups{grid-template-columns:1fr;gap:18px!important}
}

@keyframes mobile-showcase-in{
  from{opacity:0;transform:translate3d(42px,0,0) scale(.98)}
  to{opacity:1;transform:translate3d(0,0,0)}
}

@media (prefers-reduced-motion:reduce){
  .ecosystem-hero .approved-device-showcase{animation:none!important;transform:none!important}
}
