/* Final responsive safeguards: phone, small phone and tablet. */
@media (max-width:1180px){
  .header{gap:10px}.header-actions{min-width:0}
  .burger{position:relative;display:flex;flex:0 0 auto;min-width:170px;height:44px;padding:0 14px 0 46px;align-items:center;justify-content:flex-end;border:1px solid rgba(17,63,108,.16);border-radius:13px;background:rgba(255,255,255,.58);color:var(--ink);cursor:pointer}
  .burger span{position:absolute;left:14px;top:14px;display:block;width:20px;height:2px;margin:0;border-radius:2px;background:currentColor}
  .burger span+span{top:21px}.burger span:last-child:after{content:"";position:absolute;left:0;top:7px;width:20px;height:2px;border-radius:2px;background:currentColor}
  .burger:after{content:attr(aria-label);font-size:11px;font-weight:750;white-space:nowrap}
  .mobile-menu{display:flex;position:fixed;z-index:18;inset:0;padding:110px 6vw 36px;flex-direction:column;justify-content:flex-start;gap:18px;overflow-y:auto;overscroll-behavior:contain;background:rgba(232,245,255,.97);backdrop-filter:blur(20px);transform:translateY(-105%);transition:transform .45s cubic-bezier(.2,.75,.25,1)}
  .mobile-menu.open{transform:none}.mobile-menu nav{display:flex;flex-direction:column}.mobile-menu nav>a,.mobile-services-toggle{font:500 clamp(30px,5vw,48px)/1.05 Manrope,Arial,sans-serif;text-decoration:none;padding:11px 0;border-bottom:1px solid var(--line)}
  .hero{min-height:auto;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;padding-top:132px;padding-bottom:80px}
  .hero-copy{width:100%;max-width:850px;min-width:0}
  .hero h1{max-width:820px;font-size:clamp(62px,9.2vw,104px)}
  .hero-copy>p{max-width:720px}
  .hero-flow{position:relative;right:auto;top:auto;width:min(760px,88%);max-width:100%;min-height:390px;margin:56px auto 24px;padding:25px}
  .hero-actions{flex-wrap:wrap}
}
@media (max-width:700px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  /* Content must never depend on JavaScript to remain readable on phones.
     Mobile browsers can restore scroll/language navigation in an order that
     skips an IntersectionObserver callback. Keep the layout visible and use
     motion only as progressive enhancement on larger screens. */
  .reveal{opacity:1!important;transform:none!important;transition:none!important;will-change:auto!important}
  .header{width:auto;max-width:none}.header .logo{flex:0 1 150px;min-width:118px}.header .logo img{width:100%;object-fit:contain}
  .sound-toggle,.mobile-price-shortcut,.burger{flex:0 0 42px}
  .burger{min-width:42px;width:42px;height:42px;padding:0;border:0;background:transparent;display:block}.burger:after{display:none}.burger span{left:9px;top:12px;width:24px;height:2px;margin:0}.burger span+span{top:20px}.burger span:last-child:after{top:8px;width:24px;height:2px}
  .section{width:100%;max-width:100%;overflow:hidden}
  .hero{display:flex;flex-direction:column;gap:0;padding-left:20px;padding-right:20px}
  .hero-copy,.hero-flow,.pain-grid,.service-grid,.work-modes,.home-pricing,.funnel,.case-list,.process-list,.insights-grid{width:100%;max-width:100%;min-width:0}
  .case,.case.reverse{width:100%;max-width:100%;min-width:0}.case .case-art,.case.reverse .case-art{display:block!important;width:100%!important;max-width:100%!important;min-width:0}.case .case-art img,.case.reverse .case-art img{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;object-fit:cover}
  .hero h1{overflow-wrap:anywhere}.hero-actions{width:100%;max-width:310px}.hero-actions .button{width:100%;max-width:100%}
  .hero-flow{box-sizing:border-box}.hero-flow-route{width:100%;gap:3px}.flow-step{flex:0 0 49px}.flow-link{flex:1 1 6px}
  .home-pricing{padding:20px}.home-pricing header{align-items:flex-start;flex-direction:column}.home-pricing>div{grid-template-columns:1fr 1fr}.home-pricing article{padding:16px}.home-pricing article strong{font-size:25px}
  .pricing-table-head{display:none}.pricing-row{grid-template-columns:34px 1fr;padding-right:0}.pricing-row>div{grid-column:2}.pricing-row>div span{display:block}
  .mobile-menu{overflow-y:auto;overscroll-behavior:contain}.mobile-menu a{font-size:clamp(28px,9vw,42px)}
  .syntax-assistant{width:auto;left:14px;right:14px;max-width:none}
  .syntax-assistant.open{animation:none!important}
  .service-detail-hero h1{max-width:100%;font-size:clamp(45px,12vw,56px);line-height:.98;overflow-wrap:anywhere}
  .process-page .section-head h1{max-width:100%;font-size:clamp(32px,10vw,48px);line-height:1.02;overflow-wrap:anywhere}
  .process-timeline article>div{min-width:0}
  .process-timeline h2,.process-timeline p{max-width:100%;overflow-wrap:anywhere}
  img,svg,video,canvas,iframe{max-width:100%}
}

@media (max-width:600px){
  .contact-fab{width:56px;min-width:56px;min-height:56px;padding:8px;gap:0;border-radius:16px}
  .contact-fab>span,.contact-fab>small{display:none!important}
  .contact-fab b{width:40px;height:40px}
}

/* The journey pulse is positioned from the actual stage centres in site.js. */
.hero-flow-route .flow-pulse{left:0;top:0;will-change:transform,opacity}

/* Prevent the third column of section headings from creating horizontal scroll
   around tablet landscape widths. */
.section-head{grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)}
.section-head>*{min-width:0}.section-head>p{overflow-wrap:anywhere}
@media (max-width:420px){
  .header{left:7px;right:7px;padding:0 8px}.header .logo{flex-basis:128px}.sound-toggle{display:none}
  .section{padding-left:16px;padding-right:16px}.hero{padding-left:16px;padding-right:16px;padding-top:125px}
  .hero h1{font-size:clamp(43px,14.5vw,61px)}.section-head h2{font-size:39px}.contact h2{font-size:48px}
  .hero-flow{padding:15px}.hero-flow-route{transform:scale(.94);transform-origin:center}.hero-flow-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .home-pricing>div{grid-template-columns:1fr}.home-pricing article span{min-height:auto}
  .contact-assurance{flex-direction:column;align-items:flex-start}.big-contact span{font-size:18px}
}

/* Very narrow phones (320-360 CSS px).
   Do not hide oversized words: make the typography and flow diagram genuinely
   fit the available column. */
@media (max-width:360px){
  .contact h2{font-size:40px;line-height:1;overflow-wrap:anywhere}
  .process-page .section-head h1{
    max-width:100%;
    font-size:32px;
    line-height:1.02;
    letter-spacing:-.055em;
    overflow-wrap:anywhere;
  }
  .service-detail-hero h1{
    max-width:100%;
    font-size:40px;
    line-height:.98;
    letter-spacing:-.065em;
    overflow-wrap:anywhere;
  }
  .breadcrumbs{
    scrollbar-width:none;
  }
  .breadcrumbs::-webkit-scrollbar{
    display:none;
  }
  .process-timeline article{grid-template-columns:34px minmax(0,1fr);gap:10px}
  .process-timeline article>div{min-width:0}
  .process-timeline h2,.process-timeline p{max-width:100%;overflow-wrap:anywhere}

  .hero-flow{padding-left:15px;padding-right:15px}
  .hero-flow-route{
    width:100%;
    max-width:100%;
    gap:2px;
    transform:none;
  }
  .hero-flow-route .flow-step{
    flex:1 1 0;
    width:auto;
    min-width:0;
    height:54px;
    border-radius:11px;
  }
  .hero-flow-route .flow-link{flex:0 1 5px;min-width:2px;margin:0}
  .hero-flow-route .flow-step b{font-size:9px}
  .hero-flow-route .flow-step span{font-size:5px}
  .hero-flow-metrics>div{min-width:0;padding:10px 7px}
  .hero-flow-metrics small{font-size:6px;letter-spacing:.06em}
  .hero-flow-metrics strong{font-size:17px}
}
